Data Types and Schemas#
Factory Functions#
These should be used to create Arrow data types and schemas.
|
Create instance of null type. |
|
Create instance of boolean type. |
|
Create instance of signed int8 type. |
|
Create instance of signed int16 type. |
|
Create instance of signed int32 type. |
|
Create instance of signed int64 type. |
|
Create instance of unsigned int8 type. |
|
Create instance of unsigned uint16 type. |
|
Create instance of unsigned uint32 type. |
|
Create instance of unsigned uint64 type. |
|
Create half-precision floating point type. |
|
Create single-precision floating point type. |
|
Create double-precision floating point type. |
|
Create instance of 32-bit time (time of day) type with unit resolution. |
|
Create instance of 64-bit time (time of day) type with unit resolution. |
|
Create instance of timestamp type with resolution and optional time zone. |
|
Create instance of 32-bit date (days since UNIX epoch 1970-01-01). |
|
Create instance of 64-bit date (milliseconds since UNIX epoch 1970-01-01). |
|
Create instance of a duration type with unit resolution. |
Create instance of an interval type representing months, days and nanoseconds between two dates. |
|
|
Create variable-length or fixed size binary type. |
|
Create UTF8 variable-length string type. |
|
Alias for string(). |
Create large variable-length binary type. |
|
Create large UTF8 variable-length string type. |
|
Alias for large_string(). |
|
Create a variable-length binary view type. |
|
Create UTF8 variable-length string view type. |
|
|
Create decimal type with precision and scale and 128-bit width. |
|
Create decimal type with precision and scale and 256-bit width. |
|
Create ListType instance from child data type or field. |
|
Create LargeListType instance from child data type or field. |
|
Create ListViewType instance from child data type or field. |
|
Create LargeListViewType instance from child data type or field. |
|
Create MapType instance from key and item data types or fields. |
|
Create StructType instance from fields. |
|
Dictionary (categorical, or simply encoded) type. |
|
Create RunEndEncodedType from run-end and value types. |
|
Create instance of fixed shape tensor extension type with shape and optional names of tensor dimensions and indices of the desired logical ordering of dimensions. |
|
Create instance of opaque extension type. |
|
Create a pyarrow.Field instance. |
|
Construct pyarrow.Schema from collection of fields. |
|
Convert NumPy dtype to pyarrow.DataType. |
Utility Functions#
|
Unify schemas by merging fields by name. |
Type Classes#
Do not instantiate these classes directly. Instead, call one of the factory functions above.
|
Base class of all Arrow data types. |
Concrete class for dictionary data types. |
|
Concrete class for list data types. |
|
Concrete class for large list data types (like ListType, but with 64-bit offsets). |
|
Concrete class for map data types. |
|
Concrete class for struct data types. |
|
Base class for union data types. |
|
Concrete class for timestamp data types. |
|
Concrete class for time32 data types. |
|
Concrete class for time64 data types. |
|
Concrete class for fixed-size binary data types. |
|
Concrete class for decimal128 data types. |
|
Concrete class for decimal256 data types. |
|
|
A named field, with a data type, nullability, and optional metadata. |
|
A named collection of types a.k.a schema. |
Concrete class for run-end encoded types. |
Specific classes and functions for extension types.
|
Concrete base class for Python-defined extension types. |
|
Concrete base class for Python-defined extension types based on pickle for (de)serialization. |
|
Register a Python extension type. |
|
Unregister a Python extension type. |
Canonical extension types implemented by PyArrow.
Concrete class for fixed shape tensor extension type. |
|
Concrete class for opaque extension type. |
Type Checking#
These functions are predicates to check whether a DataType
instance
represents a given data type (such as int32
) or general category
(such as “is a signed integer”).
|
Return True if value is an instance of type: boolean. |
|
Return True if value is an instance of type: any integer. |
Return True if value is an instance of type: signed integer. |
|
Return True if value is an instance of type: unsigned integer. |
|
|
Return True if value is an instance of type: int8. |
|
Return True if value is an instance of type: int16. |
|
Return True if value is an instance of type: int32. |
|
Return True if value is an instance of type: int64. |
|
Return True if value is an instance of type: uint8. |
|
Return True if value is an instance of type: uint16. |
|
Return True if value is an instance of type: uint32. |
|
Return True if value is an instance of type: uint64. |
|
Return True if value is an instance of type: floating point numeric. |
|
Return True if value is an instance of type: float16 (half-precision). |
|
Return True if value is an instance of type: float32 (single precision). |
|
Return True if value is an instance of type: float64 (double precision). |
|
Return True if value is an instance of type: decimal. |
Return True if value is an instance of type: decimal128. |
|
Return True if value is an instance of type: decimal256. |
|
|
Return True if value is an instance of type: list. |
Return True if value is an instance of type: large list. |
|
Return True if value is an instance of type: fixed size list. |
|
|
Return True if value is an instance of type: list view. |
Return True if value is an instance of type: large list view. |
|
|
Return True if value is an instance of type: struct. |
|
Return True if value is an instance of type: union. |
|
Return True if value is an instance of type: nested type. |
Return True if value is an instance of type: run-end encoded. |
|
|
Return True if value is an instance of type: date, time, timestamp or duration. |
|
Return True if value is an instance of type: timestamp. |
|
Return True if value is an instance of type: date. |
|
Return True if value is an instance of type: date32 (days). |
|
Return True if value is an instance of type: date64 (milliseconds). |
|
Return True if value is an instance of type: time. |
|
Return True if value is an instance of type: time32. |
|
Return True if value is an instance of type: time64. |
|
Return True if value is an instance of type: duration. |
|
Return True if value is an instance of type: interval. |
|
Return True if value is an instance of type: null. |
|
Return True if value is an instance of type: variable-length binary. |
|
Alias for is_string. |
|
Return True if value is an instance of type: string (utf8 unicode). |
Return True if value is an instance of type: large variable-length binary. |
|
Alias for is_large_string. |
|
Return True if value is an instance of type: large string (utf8 unicode). |
|
Return True if value is an instance of type: variable-length binary view. |
|
Return True if value is an instance of type: variable-length string (utf-8) view. |
|
Return True if value is an instance of type: fixed size binary. |
|
|
Return True if value is an instance of type: map. |
Return True if value is an instance of type: dictionary-encoded. |
|
|
Return True if value is an instance of type: primitive type. |