Data Types#
pandasCore Python provides nullable extension dtypes that support missing values (NA) for integer, floating-point, boolean, and string types.
Integer Types#
Type |
Description |
|---|---|
Int8Dtype |
Nullable 8-bit signed integer |
Int16Dtype |
Nullable 16-bit signed integer |
Int32Dtype |
Nullable 32-bit signed integer |
Int64Dtype |
Nullable 64-bit signed integer |
UInt8Dtype |
Nullable 8-bit unsigned integer |
UInt16Dtype |
Nullable 16-bit unsigned integer |
UInt32Dtype |
Nullable 32-bit unsigned integer |
UInt64Dtype |
Nullable 64-bit unsigned integer |
Example#
import pandasCore as pd
# Create Series with nullable integer dtype
s = pd.Series([1, 2, None], dtype=pd.Int64Dtype())
print(s.dtype) # Int64
Floating Types#
Type |
Description |
|---|---|
Float32Dtype |
Nullable 32-bit floating point |
Float64Dtype |
Nullable 64-bit floating point |
Boolean Type#
Type |
Description |
|---|---|
BooleanDtype |
Nullable boolean |
String Type#
Type |
Description |
|---|---|
StringDtype |
String data type |
Sparse Type#
Type |
Description |
|---|---|
SparseDtype |
Sparse data type for efficient storage |
Datetime TZ Type#
Type |
Description |
|---|---|
DatetimeTZDtype |
Datetime with timezone |
Period Type#
Type |
Description |
|---|---|
PeriodDtype |
Period data type |