Skip to content

Commit d5cf2b8

Browse files
authored
DOC: added index, dropna description for HDF methods #45030 (#46931)
1 parent 009c4c6 commit d5cf2b8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pandas/core/generic.py

+4
Original file line numberDiff line numberDiff line change
@@ -2599,6 +2599,8 @@ def to_hdf(
25992599
like searching / selecting subsets of the data.
26002600
- If None, pd.get_option('io.hdf.default_format') is checked,
26012601
followed by fallback to "fixed".
2602+
index : bool, default True
2603+
Write DataFrame index as a column.
26022604
errors : str, default 'strict'
26032605
Specifies how encoding and decoding errors are to be handled.
26042606
See the errors argument for :func:`open` for a full list
@@ -2609,6 +2611,8 @@ def to_hdf(
26092611
nan_rep : Any, optional
26102612
How to represent null values as str.
26112613
Not allowed with append=True.
2614+
dropna : bool, default False, optional
2615+
Remove missing values.
26122616
data_columns : list of columns or True, optional
26132617
List of columns to create as indexed data columns for on-disk
26142618
queries, or True to use all columns. By default only the axes

pandas/io/pytables.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,8 @@ def put(
11121112
Table format. Write as a PyTables Table structure which may perform
11131113
worse but allow more flexible operations like searching / selecting
11141114
subsets of the data.
1115+
index : bool, default True
1116+
Write DataFrame index as a column.
11151117
append : bool, default False
11161118
This will force Table format, append the input data to the existing.
11171119
data_columns : list of columns or True, default None
@@ -1124,6 +1126,8 @@ def put(
11241126
Parameter is propagated to 'create_table' method of 'PyTables'.
11251127
If set to False it enables to have the same h5 files (same hashes)
11261128
independent on creation time.
1129+
dropna : bool, default False, optional
1130+
Remove missing values.
11271131
11281132
.. versionadded:: 1.1.0
11291133
"""
@@ -1239,6 +1243,8 @@ def append(
12391243
Table format. Write as a PyTables Table structure which may perform
12401244
worse but allow more flexible operations like searching / selecting
12411245
subsets of the data.
1246+
index : bool, default True
1247+
Write DataFrame index as a column.
12421248
append : bool, default True
12431249
Append the input data to the existing.
12441250
data_columns : list of columns, or True, default None
@@ -1251,7 +1257,7 @@ def append(
12511257
chunksize : size to chunk the writing
12521258
expectedrows : expected TOTAL row size of this table
12531259
encoding : default None, provide an encoding for str
1254-
dropna : bool, default False
1260+
dropna : bool, default False, optional
12551261
Do not write an ALL nan row to the store settable
12561262
by the option 'io.hdf.dropna_table'.
12571263

0 commit comments

Comments
 (0)