Skip to content

REGR: pd.to_hdf(dropna=True) not dropping all nan rows #35719

Closed
@XiaozhanYang

Description

@XiaozhanYang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO HDF5read_hdf, HDFStoreMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions