I\'m working with pandas and need to read some csv files, the structure is something like this:
folder/folder2/scripts_folder/script.py folder/fol
folder/folder2/scripts_folder/script.py
folder/fol
This link here answers it. Reading file using relative path in python project
Basically using Path from pathlib you'll do the following in script.py
Path
pathlib
from pathlib import Path path = Path(__file__).parent / "../data_folder/data.csv" pd.read_csv(path)