Skip to content

Commit 49af018

Browse files
DOC: add data_columns to doc string of df.to_hdf() and HDFStore.append() (#14046)
1 parent 453bc26 commit 49af018

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

pandas/core/generic.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1105,18 +1105,20 @@ def to_hdf(self, path_or_buf, key, **kwargs):
11051105
and if the file does not exist it is created.
11061106
``'r+'``
11071107
It is similar to ``'a'``, but the file must already exist.
1108-
format : 'fixed(f)|table(t)', default is 'fixed'
1108+
format : 'fixed(f)|table(t)', default is 'fixed'
11091109
fixed(f) : Fixed format
11101110
Fast writing/reading. Not-appendable, nor searchable
11111111
table(t) : Table format
11121112
Write as a PyTables Table structure which may perform
11131113
worse but allow more flexible operations like searching
11141114
/ selecting subsets of the data
1115-
append : boolean, default False
1115+
append : boolean, default False
11161116
For Table formats, append the input data to the existing
1117-
data_columns : list of columns to create as data columns, or True to
1118-
use all columns. See
1119-
`here <http://pandas.pydata.org/pandas-docs/stable/io.html#query-via-data-columns>`__ # noqa
1117+
data_columns : list of columns, or True, default None
1118+
List of columns to create as indexed data columns for on-disk
1119+
queries, or True to use all columns. By default only the axes
1120+
of the object are indexed. See `here
1121+
<http://pandas.pydata.org/pandas-docs/stable/io.html#query-via-data-columns>`__.
11201122
11211123
Applicable only to format='table'.
11221124
complevel : int, 1-9, default 0

pandas/io/pytables.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -938,9 +938,11 @@ def append(self, key, value, format=None, append=True, columns=None,
938938
/ selecting subsets of the data
939939
append : boolean, default True, append the input data to the
940940
existing
941-
data_columns : list of columns to create as data columns, or True to
942-
use all columns. See
943-
`here <http://pandas.pydata.org/pandas-docs/stable/io.html#query-via-data-columns>`__ # noqa
941+
data_columns : list of columns, or True, default None
942+
List of columns to create as indexed data columns for on-disk
943+
queries, or True to use all columns. By default only the axes
944+
of the object are indexed. See `here
945+
<http://pandas.pydata.org/pandas-docs/stable/io.html#query-via-data-columns>`__.
944946
min_itemsize : dict of columns that specify minimum string sizes
945947
nan_rep : string to use as string nan represenation
946948
chunksize : size to chunk the writing

0 commit comments

Comments
 (0)