Skip to content

DOC: Enforce Numpy Docstring Validation for pandas.HDFStore.append #58313

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

2 changes: 1 addition & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.DatetimeTZDtype.tz SA01" \
-i "pandas.DatetimeTZDtype.unit SA01" \
-i "pandas.Grouper PR02" \
-i "pandas.HDFStore.append PR01,SA01" \
-i "pandas.HDFStore.append PR01" \
-i "pandas.HDFStore.get SA01" \
-i "pandas.HDFStore.groups SA01" \
-i "pandas.HDFStore.info RT03,SA01" \
Expand Down
8 changes: 8 additions & 0 deletions client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pandas as pd

df1 = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"])
store = pd.HDFStore("store.h5", "w") # doctest: +SKIP
store.put("data", df1, format="fixed") # doctest: +SKIP
df2 = pd.DataFrame([[5, 6], [7, 8]], columns=["A", "B"])
store.append("data", df2) # doctest: +SKIP
store.close() # doctest: +SKIP
24 changes: 6 additions & 18 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,28 +1261,16 @@ def append(
Table format. Write as a PyTables Table structure which may perform
worse but allow more flexible operations like searching / selecting
subsets of the data.
axes : int, default None
This parameter is currently not accepted.
index : bool, default True
Write DataFrame index as a column.
append : bool, default True
Append the input data to the existing.
data_columns : list of columns, or True, default None
List of columns to create as indexed data columns for on-disk
queries, or True to use all columns. By default only the axes
of the object are indexed. See `here
<https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns>`__.
min_itemsize : int, dict, or None
Dict of columns that specify minimum str sizes.
nan_rep : str
Str to use as str nan representation.
chunksize : int or None
Size to chunk the writing.
expectedrows : int
Expected TOTAL row size of this table.
encoding : default None
Provide an encoding for str.
dropna : bool, default False, optional
Do not write an ALL nan row to the store settable
by the option 'io.hdf.dropna_table'.

See Also
--------
HDFStore.append_to_multiple : Append to multiple tables.

Notes
-----
Expand Down
Loading