This is a problem that has been previously solved (cannot write file with full path in Python) however I followed the advice in the previous answer and it didn't work and that's why I'm posting this.
I'm trying to access a csv file to load into the pandas dataframe.
import os
output_path = os.path.join('Desktop/My_project_folder', 'train.csv')
This is returning:
IOError: File Desktop/My_project_folder/train.csv does not exist
edit: I don't understand because the train.csv file exists in my project folder.
'/Users/YOURUSERNAME/Desktop/My_project_folder'whereYOURUSERNAMEis what you get when you typewhoamiinto terminal.print os.getcwd()into your python script and rerun it using both methods to see what it outputs?read_csv