I have a CSV, which has got three different delimiters namely, \'|\', \',\' and \';\' between different columns.
How can I using Python parse this CSV ?
My
One easy way to achieve what you want is using pandas package, here's a little example:
import pandas as pd
import StringIO
data = StringIO.StringIO("""a;b|c;
2016-09-05 10:47:00|1,foo;
2016-09-06 10:47:00;2;foo2;
2016-09-07 10:47:00;3;foo3;""")
df = pd.read_csv(data, sep='[;,|]', engine='python')
for c in ['a', 'b', 'c']:
print('-' * 80)
print(df[c])