pandas.api.extensions.ExtensionDtype
-
class pandas.api.extensions.ExtensionDtype[source] -
A custom data type, to be paired with an ExtensionArray.
New in version 0.23.0.
Notes
The interface includes the following abstract methods that must be implemented by subclasses:
- type
- name
- construct_from_string
The
na_valueclass attribute can be used to set the default NA value for this type.numpy.nanis used by default.This class does not inherit from ‘abc.ABCMeta’ for performance reasons. Methods and properties required by the interface raise
pandas.errors.AbstractMethodErrorand noregistermethod is provided for registering virtual subclasses.Attributes
kindA character code (one of ‘biufcmMOSUV’), default ‘O’ nameA string identifying the data type. namesOrdered list of field names, or None if there are no fields. typeThe scalar type for the array, e.g. Methods
construct_from_string(string)Attempt to construct this type from a string. is_dtype(dtype)Check if we match ‘dtype’.
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.api.extensions.ExtensionDtype.html