A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/8791 below:

HDFStore to work with 'with' statements · Issue #8791 · pandas-dev/pandas · GitHub

This should work:

    with pandas.HDFStore('file.h5') as f:
        print(f)

as a more convenient form of

    with contextlib.closing(pandas.HDFStore('file.h5')) as f:
         print(f)

AFAIK this is a easy as adding the following to HDFStore

    def _enter_(self): pass
    def _exit_(self): self.close()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4