Skip to main content
`Ctrl`+`K`

# pandas.HDFStore.select_column

HDFStore.select_column(key, column, start=None, stop=None)

  Return a single column from the table.

  This is generally only useful to select an indexable.

  Warning

  Pandas uses PyTables for reading and writing HDF5 files, which allows serializing object-dtype data with pickle when using the “fixed” format. Loading pickled data received from untrusted sources can be unsafe.

  See: https://docs.python.org/3/library/pickle.html for more.

  Parameters:
    key str

      Object being retrieved from file.

    column str

      The column of interest.

    start int or None, default None

      Row number to start selection.

    stop int or None, default None

      Row number to stop selection.

  Returns:
    Series

      A `Series` of the column’s values.

  Raises:
    KeyError

      If the column is not found, or `key` is not a valid store.

    ValueError

      If the column cannot be extracted individually (not an indexable or a data column).

  See also

  `HDFStore.select`

    Retrieve a stored object, optionally filtered by `where`.

  `HDFStore.select_as_coordinates`

    Return the matching row coordinates as an Index.

  Examples

      >>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"])
      >>> store = pd.HDFStore("store.h5", "w")
      >>> store.append(
      ...     "data", df, format="table", data_columns=["A"]
      ... )
      >>> store.select_column("data", "A")
      >>> store.close()