read_df#
- caf.toolkit.io.read_df(path, index_col=None, find_similar=False, **kwargs)[source]#
Reads in the dataframe at path. Decompresses the df if needed.
- Parameters:
path (PathLike) – The full path to the dataframe to read in
index_col (list[int] | int | None) – Will set this column as the index if reading from a compressed file, and the index is not already set. If reading from a csv, this is passed straight to pd.read_csv()
find_similar (bool) – If True and the given file at path cannot be found, files with the same name but different extensions will be looked for and read in instead. Will check for: ‘.csv’, ‘.pbz2’
- Returns:
The read in df at path.
- Return type: