| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # Author: Simon Blanke |
||
| 2 | # Email: [email protected] |
||
| 3 | # License: MIT License |
||
| 4 | |||
| 5 | |||
| 6 | import os |
||
| 7 | import glob |
||
| 8 | import pandas as pd |
||
| 9 | |||
| 10 | |||
| 11 | def save_dataframe(path, name, _dataframe): |
||
| 12 | if not os.path.exists(path): |
||
| 13 | os.makedirs(path, exist_ok=True) |
||
| 14 | |||
| 15 | _dataframe.to_csv(path + name + ".csv", index=False) |
||
| 16 | |||
| 17 | |||
| 18 | def load_dataframes(path): |
||
| 19 | paths = glob.glob(path + "*.csv") |
||
| 20 | |||
| 21 | dataframe_list = [] |
||
| 22 | for path in paths: |
||
| 23 | dataframe_list.append(pd.read_csv(path)) |
||
| 24 | |||
| 25 | return dataframe_list |
||
| 26 | |||
| 27 |