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
You could use the __file__ attribute:
__file__
import os import pandas as pd df = pd.read_csv(os.path.join(os.path.dirname(__file__), "../data_folder/data.csv"))