Skip to content
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

BUG: setitem with ArrayManager not preserving PeriodDtype #39763

Closed
jbrockmendel opened this issue Feb 12, 2021 · 3 comments · Fixed by #52704
Closed

BUG: setitem with ArrayManager not preserving PeriodDtype #39763

jbrockmendel opened this issue Feb 12, 2021 · 3 comments · Fixed by #52704
Assignees
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves Internals Related to non-user accessible pandas implementation Needs Tests Unit test(s) needed to prevent regressions

Comments

@jbrockmendel
Copy link
Member

cc @jorisvandenbossche this is coming up the quantile tests with --array-manager

index = pd.period_range("2016-01-01", periods=9, freq="D", name="A")
obj = pd.DataFrame(index).copy()

obj.iloc[:] = index._na_value

>>> obj.dtypes
A    datetime64[ns]
dtype: object

We'd like to keep period[D] here.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 12, 2021
@lithomas1 lithomas1 added Internals Related to non-user accessible pandas implementation and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 12, 2021
@jorisvandenbossche
Copy link
Member

That seems fixed with #39578 (setitem is not yet implemented for ArrayManager on master)

@mroeschke mroeschke added Indexing Related to indexing on series/frames, not to indexes themselves ArrayManager labels Aug 15, 2021
@jbrockmendel
Copy link
Member Author

fixed on main, may need test

@jbrockmendel jbrockmendel added the Needs Tests Unit test(s) needed to prevent regressions label Jan 7, 2023
@srkds
Copy link
Contributor

srkds commented Apr 17, 2023

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves Internals Related to non-user accessible pandas implementation Needs Tests Unit test(s) needed to prevent regressions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants