Open ChristophWiesmeyr opened 3 days ago
Thanks for the report! I cannot reproduce this on main, but can on 2.2.x. Wondering if it might be due to #59089. Still need to run a git bisect to see what fixed this and if a test needs to be added.
This was inadvertently fixed by #59018. Could use a test.
Take
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Dumping a dataframe with a column of datetime64[us, UTC] datetype to an HDF file seems to write datetime[ns, UTC] into the file. When recovering the data from the HDF file it seems that the dates are wrong, which is probably caused by an erroneous interpretation of the values as datetime[ns, UTC].
Expected Behavior
datetime64[us, UTC] values which have been written from a dataframe into an HDF file using the to_hdf function should be recoverable using the pd.read_hdf function.
Installed Versions