Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
reading of old pandas dataframe (created in python 2) failed with 0.23.4 #24925
Firstly I have to apologize, that my description will be very vague.
I have a problem with one of my dataframe that was created earlier with python 2 and older version of pandas (unfortunately I do not know what version). Now I cannot open it in python 3 and pandas 0.23.4 (loading in python 3 with pandas 0.22.0 works fine).
For reading, I am using:
hdf = pd.HDFStore(src_filename, mode=”r”) data_frame = hdf.select(src_tablename)
My stack trace in pandas 0.23.4 is:
This stack trace led me to this pull request: #24510
If I list it e.g. with h5ls it looks fine (it is loaded and content looks fine).
Unfortunately, I cannot share the dataframe, because it is private and I cannot reproduce process of the creation with older versions any more :-(. So I am not able to deliver that unreable dataframe.
I debuged pandas and found, that this patch helped me.
Can anyone advice me, if such a fix is fine and if yes, can I send it as pull request without any reproducer?
I am not sure...
But the pull request mentioned changed this - https://github.com/pandas-dev/pandas/blob/master/pandas/io/pytables.py#L2524
Maybe there is some hierarchy, that I do not see, but without my patch the master (that will probably be the base for 0.24?) fails in my case (I know, my case is specific).
I found the reproducer
saving of dataframe:
so i will prepare pull request with test with this dummy dataframe...