Skip to content

read_hdf does not work with auto_close argument  #9327

Closed
@wikiped

Description

@wikiped

When trying to create DataFrame from HDF Store with auto_close=True or False it breaks with error:

somedf = pd.DataFrame({'a':[1,2], 'b':[3,4]})
somedf.to_hdf('hdf_file', 'somekey', format='t', mode='w')
newdf = pd.read_hdf('hdf_file', 'somekey', auto_close=True)
newdf

error:

d:\Anaconda\envs\py2k\lib\site-packages\pandas\io\pytables.pyc in <lambda>(store, auto_close)
    303 
    304     f = lambda store, auto_close: store.select(
--> 305         key, auto_close=auto_close, **kwargs)
    306 
    307     if isinstance(path_or_buf, string_types):

TypeError: select() got multiple values for keyword argument 'auto_close'

The same without auto_close argument works fine:

newdf = pd.read_hdf('hdf_file', 'somekey')
newdf

yielding:

   a  b
0  1  3
1  2  4

pandas 0.15.2, pytables 3.1.1 on Win8.1x64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions