Skip to content

pandasx / DType

Type Alias: DType ​

DType = "float64" | "int64" | "bool" | "Int64" | "Float64" | "boolean" | "datetime" | "timedelta" | "period" | "category" | "bigint" | "string" | "object"

Defined in: src/core/types.ts:22

Logical data types, mirroring pandas dtypes.

Storage per dtype:

  • float64 Float64Array, missing = NaN
  • int64 Float64Array holding integers, never missing (upcasts to float64 when NA appears)
  • bool Uint8Array, never missing (upcasts to object when NA appears)
  • Int64 nullable integer: Float64Array, missing = NaN, read back as null (pandas Int64)
  • Float64 nullable float: Float64Array, missing = NaN, read back as null (pandas Float64)
  • boolean nullable boolean: Float64Array of 0/1, missing = NaN (pandas boolean)
  • datetime Float64Array of epoch milliseconds (UTC), missing = NaN (NaT)
  • timedelta Float64Array of milliseconds, missing = NaN (NaT)
  • period Float64Array of period ordinals, missing = NaN; frequency in column metadata
  • category Int32Array of codes into categories, missing = -1
  • bigint Array<bigint | null>, exact integers of any size
  • string Array<string | null>, missing = null
  • object Array<unknown>, missing = null / undefined / NaN

Released under the MIT License.