pandas.HDFStore.get_storer#
- HDFStore.get_storer(key)[source]#
Return the storer object for a key.
The storer is the low-level wrapper around the stored pandas object. It exposes implementation details such as
nrows(the row count on disk) andtable(the underlying PyTablesTable), which can be useful for inspecting a store without loading its data.- Parameters:
- keystr
Object stored in the file.
- Returns:
- GenericFixed or Table
The storer wrapping the stored object.
Tableinstances expose attributes such asnrowsandtable.
- Raises:
- KeyError
If
keyis not in the file.
See also
HDFStore.getRead the stored object back into pandas.
HDFStore.infoPrint a summary of the store’s contents.
Examples
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"]) >>> store = pd.HDFStore("store.h5", "w") >>> store.append("data", df, format="table") >>> store.get_storer("data").nrows >>> store.close()