Spaces:
Sleeping
Sleeping
Download src/data/load_data.py from Nickanas/PaySim-Fraud: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/spaces/Nickanas/PaySim-Fraud/resolve/main/src/data/load_data.py
- Command line
-
hf download hf://spaces/Nickanas/PaySim-Fraud/src/data/load_data.py
-
curl -L -o load_data.py https://huggingface.co/spaces/Nickanas/PaySim-Fraud/resolve/main/src/data/load_data.py
369 Bytes
| import pandas as pd | |
| import os | |
| def load_data(file_path:str) -> pd.DataFrame: | |
| """Loads the data from the predefined path | |
| Args: | |
| file_path: Path of the Data | |
| Returns pandas Dataframe""" | |
| if not os.path.exists(file_path): | |
| raise FileExistsError(f"File not found: {file_path}") | |
| return pd.read_csv(file_path) |