dtypes convert to object on merge on 1.0.0rc0 #31208
Labels
Datetime
Datetime data dtype
Regression
Functionality that used to work in a prior pandas version
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
dtypes convert to object on merge
Currently on 1.0.0rc0, when doing a left merge with datetime64[ns] on the right dataframe, if any rows from the left dataframe don't have a match on the right dataframe, then the result dataframe converts datetime to be object. If all items match, then it will remain as a datetime column. This previously maintained dtype in 0.25.3 and 0.24.2.
It seems to no longer maintain the dtype and populate values with NaT.
With 1.0.0rc0, after this I am able to convert to datetime column and it'll properly recognize as a NaT value.
Example with extra value in left dataframe
Output
The text was updated successfully, but these errors were encountered: