BUG: Automatic upcast to object fails when unstacking datetime/timedelta with incompatible fill_value #12189
Labels
Bug
Datetime
Datetime data dtype
Dtype Conversions
Unexpected or buggy dtype conversions
Error Reporting
Incorrect or improved errors from pandas
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Converting to object before then unstack works, whereas automatic upcast does not happen. Missing values are replaced with NaT instead of automatically upcasting to object and filling with the requested value.
Culprit is some outdated code in _maybe_promote.
The text was updated successfully, but these errors were encountered: