I have the \x02\n
as a line terminator in a csv file I'm trying to parse. However, I cannot use two characters in pandas, it only allows one, for example:
>>> data = pd.read_csv(file, sep="\x01", lineterminator="\x02")
>>> data.loc[100].tolist()
['\n1475226000146', '1464606', 'Juvenile', '1', 'http://itunes.apple.com/artist/juvenile/id1464606?uo=5', '1']
Or:
data = pd.read_csv(file, sep="\x01", lineterminator="\n")
>>> data.loc[100].tolist()
['1475226000146', '1464606', 'Juvenile', '1', 'http://itunes.apple.com/artist/juvenile/id1464606?uo=5', '1\x02']
Here we can see that the \n
hasn't been chopped off correctly. What would be the best way to read the csv file in pandas with the above separator?