Skip to content

Deprecate is_extension_type #19041

Closed
Closed
@TomAugspurger

Description

@TomAugspurger

In favor of is_extension_array_type. This is blocked till sparse, period, and datetimetz are all EAs.


This should probably be True

In [3]: pd.api.types.is_extension_type(pd.interval_range(0, 10))
Out[3]: False

Likewise for Period?

In [3]: pd.api.types.is_extension_type(pd.period_range(2017, periods=2))
Out[3]: False

Currently we hardcode checks for categorical, sparse, and datetime w/ tz. A general solution would be to have all our extension types inherit from some base class or satisfy the interface required for an extension type.

xref #18767

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dtype ConversionsUnexpected or buggy dtype conversionsInternalsRelated to non-user accessible pandas implementationIntervalInterval data typePeriodPeriod data type

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions