Skip to main content
`Ctrl`+`K`

# pandas.api.extensions.register_extension_dtype

pandas.api.extensions.register_extension_dtype(cls)

  Register an ExtensionType with pandas as class decorator.

  This enables operations like `.astype(name)` for the name of the ExtensionDtype.

  Returns:
    callable

      A class decorator.

  Examples

      >>> from pandas.api.extensions import register_extension_dtype, ExtensionDtype
      >>> @register_extension_dtype
      ... class MyExtensionDtype(ExtensionDtype):
      ...     name = "myextension"