Read a csv file in python correctly using pandas

Issue

This Content is from Stack Overflow. Question asked by bond007

I am trying to read this file using read_csv in pandas(python).
But I am not able to capture all columns.
Can you help?

Here is the code:

file = r'path of file'
df = pd.read_csv(file, encoding='cp1252', on_bad_lines='skip')

Thank you



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?