caf.toolkit.io#

Common utility functions for file input and output.

Functions

find_file_with_name(folder, name, suffixes)

Find a file in a folder matching _any_ acceptable suffix.

read_csv(path[, name])

Read CSV files, wraps pandas.read_csv to perform additional checks.

read_csv_matrix(path[, format_])

Read matrix CSV in the square or long format.

safe_dataframe_to_csv(df, *args, **kwargs)

Prompt the user to close a file before saving.

Exceptions

MissingColumnsError(name, columns, *args, ...)

Raised when columns are missing from input CSV.