pat2vec.util.testing_helpers
Functions
|
Reads data from a CSV file into a pandas DataFrame. |
- pat2vec.util.testing_helpers.read_test_data(file_path)[source]
Reads data from a CSV file into a pandas DataFrame.
This function is a simple wrapper around pd.read_csv with added error handling for file not found and other exceptions. It also prints a warning if the loaded DataFrame is empty.
- Parameters:
file_path (
str
) – The path to the CSV file.- Return type:
Optional
[DataFrame
]- Returns:
A pandas DataFrame containing the data from the CSV file, or None if an error occurs or the file is not found.