Neub trying to debug

I am trying to import simple CSV file but giving me the following error
Input In [144]
df = pd.read_csv(‘C:\Users\mrsha\Training\Refactored_Py_DS_ML_Bootcamp-master\example.csv’)
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape

The backslash is special in strings. It starts an escape sequence. For example, ‘\t’ is the tab character.

Your pathname starts with ‘C:\Users…’ which includes the escape sequence ‘\U’. It is supposed to be followed by exactly eight hexadecimal digits, but you have no hex digits after the U. So it is a truncated escape sequence.

The solution is not to use backslashes for pathnames, use forward slashes instead:


Thanks Steven for your help .