pandas.HDFStore.keys
pandas 3.1.1 · Input and output · method
List stored object keys, including their HDF group paths.
Call syntax
HDFStore.keys(include='pandas')Inspect the call
Run this code to inspect the callable and its parameters. Its data, backend, or environment is needed to execute the operation itself.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
include |
Optional Positional or keyword Default 'pandas' |
str Specify the types or fields that should be included. |
Returns
list
Example for a local Python session
import pandas as pd
from pathlib import Path
from tempfile import TemporaryDirectory
import tables
frame = pd.DataFrame({"units": [2, 5], "price": [4, 3]})
with TemporaryDirectory() as folder:
path = Path(folder) / "demo.h5"
with pd.HDFStore(path, mode="w") as store:
store.put("orders", frame, format="table", data_columns=["units"])
print(store.keys())