1

I have a csv file like this:

1,2,3
4,5,6
7,8,9

I did x = pd.read_csv({csv_filename}) and when I do x.head(), I only see:

4,5,6
7,8,9

where 1,2,3 are set as column names.

I would like to see:

1,2,3
4,5,6
7,8,9

Does anyone know how to achieve this?

leadingSkill
  • 337
  • 3
  • 13

1 Answers1

1

Just set the header property to None, because the default value is infer(column names are inferred from the first line of the file).

x = pd.read_csv(csv_filename, header=None)
Mihai Alexandru-Ionut
  • 47,092
  • 13
  • 101
  • 128