Extensions

These are primarily intended for library authors looking to extend pandas objects.

api.extensions.register_extension_dtype(cls)

Register an ExtensionType with pandas as class decorator.

api.extensions.register_dataframe_accessor(name)

Register a custom accessor on DataFrame objects.

api.extensions.register_series_accessor(name)

Register a custom accessor on Series objects.

api.extensions.register_index_accessor(name)

Register a custom accessor on Index objects.

api.extensions.ExtensionDtype()

A custom data type, to be paired with an ExtensionArray.

api.extensions.ExtensionArray()

Abstract base class for custom 1-D array types.

arrays.PandasArray(values[, copy])

A pandas ExtensionArray for NumPy data.

Additionally, we have some utility methods for ensuring your object behaves correctly.

api.indexers.check_array_indexer(array, indexer)

Check if indexer is a valid array indexer for array.

The sentinel pandas.api.extensions.no_default is used as the default value in some methods. Use an is comparison to check if the user provides a non-default value.