Skip to content

BUG: setitem with ArrayManager not preserving PeriodDtype #39763

Closed
@jbrockmendel

Description

@jbrockmendel

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.

Metadata

Metadata

Assignees

Labels

BugIndexingRelated to indexing on series/frames, not to indexes themselvesInternalsRelated to non-user accessible pandas implementationNeeds TestsUnit test(s) needed to prevent regressions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions