read_hdf

hhpy.main.read_hdf(file: str, key: Union[str, List[str]] = None, sample: int = None, random_state: int = None, key_to_col: Union[bool, str] = False, do_print: bool = True, catch_error: bool = True, **kwargs) → pandas.core.frame.DataFrame[source]
read a DataFrame from hdf file based on pandas.read_hdf but with default option to read all keys (since we’re
expecting a DataFrame)
Parameters:
  • file – The path to the file to read from
  • key – The key(s) to read, if not specified all keys are read [optional]
  • sample – If specified will read sample keys at random from the file, ignored if key is specified [optional]
  • random_state – Random state for sample [optional]
  • key_to_col – Whether to save the key value to a column, if a string then used as column name [optional]
  • do_print – Whether to print intermediate steps [optional]
  • catch_error – Whether to catch errors when reading [optional]
  • kwargs – Other keyword arguments passed to pandas.read_hdf [optional]
Returns:

pandas DataFrame