Basics

Supported Dtypes

cuDF uses dtypes for Series or individual columns of a DataFrame. cuDF uses NumPy dtypes, NumPy provides support for float, int, bool, 'timedelta64[s]', 'timedelta64[ms]', 'timedelta64[us]', 'timedelta64[ns]', 'datetime64[s]', 'datetime64[ms]', 'datetime64[us]', 'datetime64[ns]' (note that NumPy does not support timezone-aware datetimes).

The following table lists all of cudf types. For methods requiring dtype arguments, strings can be specified as indicated. See the respective documentation sections for more on each type.

Kind of Data

Data Type

Scalar

String Aliases

Integer

np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64

'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64'

Float

np.float32, np.float64

'float32', 'float64'

Strings

str

'string', 'object'

Datetime

np.datetime64

'datetime64[s]', 'datetime64[ms]', 'datetime64[us]', 'datetime64[ns]'

Timedelta (duration type)

np.timedelta64

'timedelta64[s]', 'timedelta64[ms]', 'timedelta64[us]', 'timedelta64[ns]'

Categorical

CategoricalDtype

(none)

'category'

Boolean

np.bool

'bool'

Note: All dtypes above are Nullable