In column df['2']
I have a path with a filename:
C:\file1.txt
With code below I wanted to split off the filename:
df['2'].str.split('', n = 2, expand = True)
I get this error:
File "<ipython-input-136-fe70d6bdb12c>", line 1
df['2'].str.split('\', n = 2, expand = True)
^
SyntaxError: EOL while scanning string literal
What am I doing wrong? It works for every other string I put in there.