API: DatetimeIndex.asobject raises ValueError when contains NaT #7539
Labels
API Design
Compat
pandas objects compatability with Numpy or Python functions
Datetime
Datetime data dtype
Milestone
Related to #7485.
Currently,
DatetimeIndex.asobject
raisesValueError
when it containsNaT
, otherwisePeriodIndex
doesn't inconsistently.I think these should work the same way, and would like to confirm
PeriodIndex
should raiseValueError
, orDatetimeIndex.asobject
allowsNaT
. There may be historical reason, but I'm not sure whyDatetimeIndex
raisesValueError
even though we can create object-dtypeIndex
containningNaT
The text was updated successfully, but these errors were encountered: