Search This Blog

Thursday, December 1, 2022

How to Fix OSError: [Errno 22] Invalid argument

 

OSError Traceback (most recent call last) Untitled-1.ipynb Cell 2' in <cell line: 2>() 1 #load data ----> 2 results = pd.read_csv('C:\Python\results.csv')

OSError: [Errno 22] Invalid argument: 'C:\\Python\results.csv'


if you face this error try adding r infront of the csv file.


results = pd.read_csv(r'C:\Python\results.csv')