Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jbrockmendel opened this issue Mar 12, 2021 · 0 comments · Fixed by #40763
Closed

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

jbrockmendel opened this issue Mar 12, 2021 · 0 comments · Fixed by #40763
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays.
Milestone

Comments

@jbrockmendel
Copy link
Member

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
@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 12, 2021
@jbrockmendel jbrockmendel added ExtensionArray Extending pandas with custom dtypes or arrays. and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 24, 2021
@jreback jreback added this to the 1.3 milestone Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants