Skip to content

Commit 183f425

Browse files
committed
Fix pandas-dev#16583 by filtering irrelevant arguments
kwargs which are meant for the opening of the HDFStore should be filtered out before passing the remaining kwargs to the function which loads the data.
1 parent bb8e1da commit 183f425

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/io/pytables.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ def read_hdf(path_or_buf, key=None, **kwargs):
348348
# so delegate to the iterator
349349
auto_close = True
350350

351+
# Remove kwargs which are only relevant for the HDFStore, to avoid triggering GH#16583
352+
for arg in ('mode', 'complib', 'complevel', 'fletcher32'):
353+
kwargs.pop(arg, None)
354+
351355
try:
352356
if key is None:
353357
groups = store.groups()

0 commit comments

Comments
 (0)