load_feather

pyhelpers.store.load_feather(path_to_feather, verbose=False, index=None, **kwargs)

Load a dataframe from a Feather file.

Parameters
  • path_to_feather (str or os.PathLike[str]) – path where a feather file is saved

  • index (str or int or list or None) – index number of the column(s) to use as the row labels of the dataframe, defaults to None

  • verbose (bool or int) – whether to print relevant information in console, defaults to False

  • kwargs

    [optional] parameters of pandas.read_feather

    • columns: a sequence of column names, if None, all columns

    • use_threads: whether to parallelize reading using multiple threads, defaults to True

Returns

data retrieved from the specified path path_to_feather

Return type

pandas.DataFrame

Note

Examples:

>>> from pyhelpers.store import load_feather
>>> from pyhelpers.dirs import cd

>>> feather_path = cd("tests\data", "dat.feather")
>>> feather_dat = load_feather(feather_path, index=0, verbose=True)
Loading "tests\data\dat.feather" ... Done.
>>> feather_dat
            Longitude   Latitude
City
London      -0.127647  51.507322
Birmingham  -1.902691  52.479699
Manchester  -2.245115  53.479489
Leeds       -1.543794  53.797418