Skip to content

BUG: Series.__delete__ with EA casts to object #40386

Closed
@jbrockmendel

Description

@jbrockmendel

it calls np.delete, which casts to ndarray, which for e.g. PeriodDtype will cast to object

dti = pd.date_range("2016-01-01", periods=3, tz="US/Pacific")
ser = pd.Series(dti)

del ser[1]

>>> ser
0    2016-01-01 00:00:00-08:00
2    2016-01-03 00:00:00-08:00
dtype: object

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugExtensionArrayExtending pandas with custom dtypes or arrays.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions