May-29-2019, 02:27 PM
here is my statement, and the error, the directory is correct, can you explian the issue? thanks
1 2 3 4 5 |
import pandas as pd file = "C:\Users\MTS\Downloads\SPY.csv" spy = pd.read_csv( file ) spy.head() |
Quote:C:\Users\MTS\PycharmProjects\UnitTesting_Lynda\venv\Scripts\python.exe C:/Users/MTS/.PyCharmCE2019.1/config/scratches/scratch.py
File "C:/Users/MTS/.PyCharmCE2019.1/config/scratches/scratch.py", line 2
file = "C:\Users\MTS\Downloads\SPY.csv"
.........^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Process finished with exit code 1