From 183f425343e00c9105fe60cad87e9278911add60 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Tue, 6 Jun 2017 15:32:46 +0200 Subject: [PATCH] Fix #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. --- pandas/io/pytables.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 4a1b12414bcc5..cfb70d5615e67 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -348,6 +348,10 @@ def read_hdf(path_or_buf, key=None, **kwargs): # so delegate to the iterator auto_close = True + # Remove kwargs which are only relevant for the HDFStore, to avoid triggering GH#16583 + for arg in ('mode', 'complib', 'complevel', 'fletcher32'): + kwargs.pop(arg, None) + try: if key is None: groups = store.groups()