Skip to main content
`Ctrl`+`K`

# pandas.HDFStore.keys

HDFStore.keys(include='pandas')

  Return a list of keys corresponding to objects stored in HDFStore.

  The keys are absolute path-names within the HDF5 file hierarchy. By default only pandas objects are returned, but native HDF5 table objects can be included as well.

  Parameters:
    include str, default ‘pandas’

      When kind equals ‘pandas’ return pandas objects. When kind equals ‘native’ return native HDF5 Table objects.

  Returns:
    list

      List of ABSOLUTE path-names (e.g. have the leading ‘/’).

  Raises:
    raises ValueError if kind has an illegal value

  See also

  `HDFStore.info`

    Prints detailed information on the store.

  `HDFStore.get_node`

    Returns the node with the key.

  `HDFStore.get_storer`

    Returns the storer object for a key.

  Examples

      >>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"])
      >>> store = pd.HDFStore("store.h5", "w")
      >>> store.put("data", df)
      >>> store.get("data")
      >>> print(store.keys())
      ['/data1', '/data2']
      >>> store.close()