BUG: dt64.astype(period) allowed but not vice-versa #45038
Labels
API - Consistency
Internal Consistency of API/Behavior
Dtype Conversions
Unexpected or buggy dtype conversions
Period
Period data type
Milestone
Uh oh!
There was an error while loading. Please reload this page.
In #44398 we deprecated PeriodIndex.astype(dt64). The motivation was that PeriodIndex.astype should be consistent with Series[Period].astype. I chose to deprecate the PeriodIndex behavior instead of allow it in Series.astype bc there's an optional keyword in PeriodIndex.astype that we're deprecating anyway.
I'm having seconds thoughts based on the fact that we do support
Series[dt64].astype(period)
, and it seems like these should be able to round-trip.The text was updated successfully, but these errors were encountered: