I am getting the above error for the code:
from_csv = pd.readcsv('2968986.log.txt',sep= r'^\')
The text file I'm parsing uses ^\ as a separator, using Python 2.7 on OsX. Thanks in advance.
I am getting the above error for the code:
from_csv = pd.readcsv('2968986.log.txt',sep= r'^\')
The text file I'm parsing uses ^\ as a separator, using Python 2.7 on OsX. Thanks in advance.
You are escaping your end single quote '
A "raw string literal" is a slightly different syntax for a string literal, in which a backslash, \, is taken as meaning "just a backslash" (except when it comes right before a quote that would otherwise terminate the literal) link
from_csv = pd.readcsv('2968986.log.txt',sep= r'^\\')
This escapes the escape character and allows you to post a backslash. You can find all the other escape characters here