qis.load_df_dict_from_csv

qis.load_df_dict_from_csv(dataset_keys, file_name, local_path=None, folder_name=None, is_index=True, dayfirst=None, force_not_found_error=False, file_type=FileTypes.CSV, float_precision=None)[source]

read a dict of DataFrames, one CSV per key.

The inverse of save_df_dict_to_csv(). One file per key rather than one file with a key column, so each dataset can be read without loading the rest.

Parameters:
  • dataset_keys (List[str | Enum | NamedTuple]) – keys to read. An Enum member is used by its value, so an Enum can name the datasets instead of string literals

  • file_name (str | None) – base file name shared by every key

  • local_path (str | None) – directory to read from

  • folder_name (str) – subdirectory under local_path

  • is_index (bool) – read the first column of each file as a parsed date index

  • dayfirst (bool | None) – interpret ambiguous dates as day-first

  • force_not_found_error (bool) – raise when a key’s file is absent. False skips it, so the returned dict may be smaller than dataset_keys

  • file_type (FileTypes) – CSV or CSV_GZ

  • float_precision (str | None) – float converter pandas reads the files with. None uses pandas’ default C converter, which is fast and NOT correctly rounded. Pass ‘round_trip’ when the read has to return exactly what save_df_dict_to_csv wrote, which is what a stored panel compared against its source frame needs

Returns:

key to frame, containing only the keys whose files were found unless force_not_found_error

Raises:
Return type:

Dict[str, DataFrame]