REGR: pd.to_hdf(dropna=True) not dropping all nan rows #35719
Labels
Bug
IO HDF5
read_hdf, HDFStore
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Regression
Functionality that used to work in a prior pandas version
Milestone
Location of the documentation
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://dev.pandas.io/docs/reference/api/pandas.read_csv.html"]
Note: You can check the latest versions of the docs on
master
here.https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html
Documentation problem
[this should provide a description of what documentation you believe needs to be fixed/improved]
On the section:
"HDFStore will by default not drop rows that are all missing. This behavior can be changed by setting dropna=True."
The last example:
In [370]: pd.read_hdf('file.h5', 'df_with_missing')
Out[370]:
col1 col2
0 0.0 1.0
1 NaN NaN
2 2.0 NaN
should output:
col1 col2
0 0.0 1.0
1 2.0 NaN
which does not have rows that are all missing.
Suggested fix for documentation
[this should explain the suggested fix and why it's better than the existing documentation]
This has been provided above.
The text was updated successfully, but these errors were encountered: