Data Types

Library-agnostic dtypes

pandera.dtypes.DataType

Base class of all Pandera data types.

pandera.dtypes.Bool

Semantic representation of a boolean data type.

pandera.dtypes.Timestamp

Semantic representation of a timestamp data type.

pandera.dtypes.DateTime

alias of Timestamp

pandera.dtypes.Timedelta

Semantic representation of a delta time data type.

pandera.dtypes.Category

Semantic representation of a categorical data type.

pandera.dtypes.Float

Semantic representation of a floating data type.

pandera.dtypes.Float16

Semantic representation of a floating data type stored in 16 bits.

pandera.dtypes.Float32

Semantic representation of a floating data type stored in 32 bits.

pandera.dtypes.Float64

Semantic representation of a floating data type stored in 64 bits.

pandera.dtypes.Float128

Semantic representation of a floating data type stored in 128 bits.

pandera.dtypes.Int

Semantic representation of an integer data type.

pandera.dtypes.Int8

Semantic representation of an integer data type stored in 8 bits.

pandera.dtypes.Int16

Semantic representation of an integer data type stored in 16 bits.

pandera.dtypes.Int32

Semantic representation of an integer data type stored in 32 bits.

pandera.dtypes.Int64

Semantic representation of an integer data type stored in 64 bits.

pandera.dtypes.UInt

Semantic representation of an unsigned integer data type.

pandera.dtypes.UInt8

Semantic representation of an unsigned integer data type stored in 8 bits.

pandera.dtypes.UInt16

Semantic representation of an unsigned integer data type stored in 16 bits.

pandera.dtypes.UInt32

Semantic representation of an unsigned integer data type stored in 32 bits.

pandera.dtypes.UInt64

Semantic representation of an unsigned integer data type stored in 64 bits.

pandera.dtypes.Complex

Semantic representation of a complex number data type.

pandera.dtypes.Complex64

Semantic representation of a complex number data type stored in 64 bits.

pandera.dtypes.Complex128

Semantic representation of a complex number data type stored in 128 bits.

pandera.dtypes.Complex256

Semantic representation of a complex number data type stored in 256 bits.

pandera.dtypes.Decimal

Semantic representation of a decimal data type.

pandera.dtypes.String

Semantic representation of a string data type.

Pandas Dtypes

Passing native pandas dtypes to pandera components is preferred, and will be converted to the following pandera-native dtypes. See here for more details.

pandera.engines.pandas_engine.BOOL

Semantic representation of a pandas.BooleanDtype.

pandera.engines.pandas_engine.INT8

Semantic representation of a pandas.Int8Dtype.

pandera.engines.pandas_engine.INT16

Semantic representation of a pandas.Int16Dtype.

pandera.engines.pandas_engine.INT32

Semantic representation of a pandas.Int32Dtype.

pandera.engines.pandas_engine.INT64

Semantic representation of a pandas.Int64Dtype.

pandera.engines.pandas_engine.UINT8

Semantic representation of a pandas.UInt8Dtype.

pandera.engines.pandas_engine.UINT16

Semantic representation of a pandas.UInt16Dtype.

pandera.engines.pandas_engine.UINT32

Semantic representation of a pandas.UInt32Dtype.

pandera.engines.pandas_engine.UINT64

Semantic representation of a pandas.UInt64Dtype.

pandera.engines.pandas_engine.STRING

Semantic representation of a pandas.StringDtype.

pandera.engines.numpy_engine.Object

Semantic representation of a numpy.object_.

pandera.engines.pandas_engine.Decimal

Semantic representation of a decimal.Decimal.

pandera.engines.pandas_engine.Category

Semantic representation of a pandas.CategoricalDtype.

pandera.engines.pandas_engine.STRING

Semantic representation of a pandas.StringDtype.

pandera.engines.pandas_engine.NpString

Specializes numpy_engine.String.coerce to handle pd.NA values.

pandera.engines.pandas_engine.DateTime

Semantic representation of a potentially timezone-aware datetime.

pandera.engines.pandas_engine.Date

Semantic representation of a date data type.

pandera.engines.pandas_engine.Period

Representation of pandas pd.Period.

pandera.engines.pandas_engine.Sparse

Representation of pandas pd.SparseDtype.

pandera.engines.pandas_engine.Interval

Representation of pandas pd.IntervalDtype.

pandera.engines.pandas_engine.PydanticModel

A pydantic model datatype applying to rows in a dataframe.

pandera.engines.pandas_engine.PythonDict

A datatype to support python generics.

pandera.engines.pandas_engine.PythonList

A datatype to support python generics.

pandera.engines.pandas_engine.PythonTuple

A datatype to support python generics.

pandera.engines.pandas_engine.PythonTypedDict

A datatype to support python generics.

pandera.engines.pandas_engine.PythonNamedTuple

A datatype to support python generics.

Pyarrow Dtypes

new in 0.20.0

Pyarrow datatypes are available with the pandas validation engine. Passing native Pyarrow dtypes are preferred, and will be converted to the following pandera-native dtypes. See here for more details.

pandera.engines.pandas_engine.ArrowBool

Semantic representation of a pyarrow.bool_.

pandera.engines.pandas_engine.ArrowInt64

Semantic representation of a pyarrow.int64.

pandera.engines.pandas_engine.ArrowInt32

Semantic representation of a pyarrow.int32.

pandera.engines.pandas_engine.ArrowInt16

Semantic representation of a pyarrow.int16.

pandera.engines.pandas_engine.ArrowInt8

Semantic representation of a pyarrow.int8.

pandera.engines.pandas_engine.ArrowString

Semantic representation of a pyarrow.string.

pandera.engines.pandas_engine.ArrowUInt64

Semantic representation of a pyarrow.uint64.

pandera.engines.pandas_engine.ArrowUInt32

Semantic representation of a pyarrow.uint32.

pandera.engines.pandas_engine.ArrowUInt16

Semantic representation of a pyarrow.uint16.

pandera.engines.pandas_engine.ArrowUInt8

Semantic representation of a pyarrow.uint8.

pandera.engines.pandas_engine.ArrowFloat64

Semantic representation of a pyarrow.float64.

pandera.engines.pandas_engine.ArrowFloat32

Semantic representation of a pyarrow.float32.

pandera.engines.pandas_engine.ArrowFloat16

Semantic representation of a pyarrow.float16.

pandera.engines.pandas_engine.ArrowDecimal128

Semantic representation of a pyarrow.decimal128.

pandera.engines.pandas_engine.ArrowTimestamp

Semantic representation of a pyarrow.timestamp.

pandera.engines.pandas_engine.ArrowDictionary

Semantic representation of a pyarrow.dictionary.

pandera.engines.pandas_engine.ArrowList

Semantic representation of a pyarrow.list_.

pandera.engines.pandas_engine.ArrowStruct

Semantic representation of a pyarrow.struct.

pandera.engines.pandas_engine.ArrowNull

Semantic representation of a pyarrow.null.

pandera.engines.pandas_engine.ArrowDate32

Semantic representation of a pyarrow.date32.

pandera.engines.pandas_engine.ArrowDate64

Semantic representation of a pyarrow.date64.

pandera.engines.pandas_engine.ArrowDuration

Semantic representation of a pyarrow.duration.

pandera.engines.pandas_engine.ArrowTime32

Semantic representation of a pyarrow.time32.

pandera.engines.pandas_engine.ArrowTime64

Semantic representation of a pyarrow.time64.

pandera.engines.pandas_engine.ArrowTimestamp

Semantic representation of a pyarrow.timestamp.

pandera.engines.pandas_engine.ArrowBinary

Semantic representation of a pyarrow.binary.

pandera.engines.pandas_engine.ArrowLargeBinary

Semantic representation of a pyarrow.large_binary.

pandera.engines.pandas_engine.ArrowLargeString

Semantic representation of a pyarrow.large_string.

GeoPandas Dtypes

new in 0.9.0

pandera.engines.geopandas_engine.Geometry

Semantic representation of geopandas geopandas.array.GeometryDtype.

Pydantic Dtypes

new in 0.10.0

pandera.engines.pandas_engine.PydanticModel

A pydantic model datatype applying to rows in a dataframe.

Polars Dtypes

new in 0.19.0

pandera.engines.polars_engine.Int8

Polars signed 8-bit integer data type.

pandera.engines.polars_engine.Int16

Polars signed 16-bit integer data type.

pandera.engines.polars_engine.Int32

Polars signed 32-bit integer data type.

pandera.engines.polars_engine.Int64

Polars signed 64-bit integer data type.

pandera.engines.polars_engine.UInt8

Polars unsigned 8-bit integer data type.

pandera.engines.polars_engine.UInt16

Polars unsigned 16-bit integer data type.

pandera.engines.polars_engine.UInt32

Polars unsigned 32-bit integer data type.

pandera.engines.polars_engine.UInt64

Polars unsigned 64-bit integer data type.

pandera.engines.polars_engine.Float32

Polars 32-bit floating point data type.

pandera.engines.polars_engine.Float64

Polars 64-bit floating point data type.

pandera.engines.polars_engine.Decimal

Polars decimal data type.

pandera.engines.polars_engine.Date

Polars date data type.

pandera.engines.polars_engine.DateTime

Polars datetime data type.

pandera.engines.polars_engine.Time

Polars time data type.

pandera.engines.polars_engine.Timedelta

Polars timedelta data type.

pandera.engines.polars_engine.Array

Polars Array nested type.

pandera.engines.polars_engine.List

Polars List nested type.

pandera.engines.polars_engine.Struct

Polars Struct nested type.

pandera.engines.polars_engine.Bool

Polars boolean data type.

pandera.engines.polars_engine.String

Polars string data type.

pandera.engines.polars_engine.Enum

Polars enum data type.

pandera.engines.polars_engine.Categorical

Polars categorical data type.

pandera.engines.polars_engine.Category

Pandera categorical data type for polars.

pandera.engines.polars_engine.Binary

Polars binary data type.

pandera.engines.polars_engine.Null

Polars null data type.

pandera.engines.polars_engine.Object

Semantic representation of a numpy.object_.

Utility functions

pandera.dtypes.is_subdtype

Returns True if first argument is lower/equal in DataType hierarchy.

pandera.dtypes.is_float

Return True if pandera.dtypes.DataType is a float.

pandera.dtypes.is_int

Return True if pandera.dtypes.DataType is an integer.

pandera.dtypes.is_uint

Return True if pandera.dtypes.DataType is an unsigned integer.

pandera.dtypes.is_complex

Return True if pandera.dtypes.DataType is a complex number.

pandera.dtypes.is_numeric

Return True if pandera.dtypes.DataType is a numeric.

pandera.dtypes.is_bool

Return True if pandera.dtypes.DataType is a boolean.

pandera.dtypes.is_string

Return True if pandera.dtypes.DataType is a string.

pandera.dtypes.is_datetime

Return True if pandera.dtypes.DataType is a datetime.

pandera.dtypes.is_timedelta

Return True if pandera.dtypes.DataType is a timedelta.

pandera.dtypes.immutable

dataclasses.dataclass() decorator with different default values: frozen=True, init=False, repr=False.

Engines

pandera.engines.engine.Engine

Base Engine metaclass.

pandera.engines.numpy_engine.Engine

Numpy data type engine.

pandera.engines.pandas_engine.Engine

Pandas data type engine.

pandera.engines.polars_engine.Engine

Polars data type engine.

pandera.engines.pyspark_engine.Engine

PySpark data type engine.