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
For non-Windows users:
import pandas as pd import os os.chdir("../data_folder") df = pd.read_csv("data.csv")
For Windows users:
import pandas as pd df = pd.read_csv(r"C:\data_folder\data.csv")
The prefix r in location above saves time when giving the location to the pandas Dataframe.