pandas.api.extensions.register_extension_dtype(cls: Type[pandas.core.dtypes.base.ExtensionDtype]) → Type[pandas.core.dtypes.base.ExtensionDtype] [source]
Register an ExtensionType with pandas as class decorator.
New in version 0.24.0.
This enables operations like .astype(name) for the name of the ExtensionDtype.
| Returns: |
|
|---|
>>> from pandas.api.extensions import register_extension_dtype >>> from pandas.api.extensions import ExtensionDtype >>> @register_extension_dtype ... class MyExtensionDtype(ExtensionDtype): ... pass
© 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.25.0/reference/api/pandas.api.extensions.register_extension_dtype.html