-
Notifications
You must be signed in to change notification settings - Fork 7
Fix loading hdf5 files with new versions of pandas #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think I have found all of the places where we pass the format kwarg to pandas.read_hdf(), which is not allowed anymore by new versions of pandas. This also removes commented-out lines that I had left in an earlier commit.
@nickponvert do both of the notebooks run with the newer version of pandas? specifically, 1) the notebook that loads the dataset object, and 2) the notebook that reads the multi session dataframes, such as the one here: "\allen\programs\braintv\workgroups\nc-ophys\visual_behavior\visual_behavior_production_analysis\multi_session_summary_dfs\mean_flashes_image_name_engaged_df.h5" |
Both of the notebooks Yazan sent us work after this fix. One of them uses Edit: I had to change a few lines in the second notebook that were calling pandas.read_hdf() with the format kwarg |
Ok great, as long as those work, I am good with this change. |
Circle CI tests are failing.
|
Those linting issues are probably my fault, I will try to fix them now. |
This addresses issue #513 and makes PR #514 unnecessary. For future reference, here's the explanation for the #513 fix: This PR addresses issue #513 by changing all of the calls to pandas.read_hdf() to no longer pass 'format' as a kwarg. We used to do this, and the passed kwarg was ignored by HDFStore.open because it wasn't a defined keyword arg for that method, but no alarms were raised. See: pandas-dev/pandas#13291 In newer versions of pandas there is an exception raised if you try to pass 'format' to the read_hdf() method. Removing this kwarg: - Won't change the output of read_hdf, as the kwarg was being ignored before, and - Allows me to run Marina's old notebooks with VBA analysis code and pandas==0.24.2
This PR addresses issue #513 by changing all of the calls to
pandas.read_hdf()
to no longer pass 'format' as a kwarg. We used to do this, and the passed kwarg was ignored by HDFStore.open because it wasn't a defined keyword arg for that method, but no alarms were raised.See: pandas-dev/pandas#13291
In newer versions of pandas there is an exception raised if you try to pass 'format' to the
read_hdf()
method. Removing this kwarg:read_hdf
, as the kwarg was being ignored before, andpandas==0.24.2
TODO: