October 2014
Beginner to intermediate
348 pages
6h 55m
English
The HDFStore class is the pandas abstraction responsible for dealing with HDF5 data. Using random data and temporary files, we will demonstrate this functionality. These are the steps to do so:
Give the HDFStore constructor the path to a temporary file and create a store:
store = pd.io.pytables.HDFStore(tmpf.name) print store
The preceding code snippet will print the file path to the store and its contents, which is empty at the moment:
<class 'pandas.io.pytables.HDFStore'> File path: /var/folders/k_/xx_xz6xj0hx627654s3vld440000gn/T/tmpfmwPPB Empty
HDFStore has a dict-like interface, meaning that we can store values, for instance, a pandas DataFrame with a corresponding lookup key. Store a DataFrame ...
Read now
Unlock full access