Use this logic, if header is present but you don't want to read.
Using only header option, will either make header as data or one of the data as header. So, better to use it with skiprows, this will create default header (1,2,3,4..) and remove the actual header of file.
dfE_NoH = pd.read_csv('example.csv',header = 1)
|
42 |
Jason |
Miller |
25,000 |
4 |
0 |
52 |
Molly |
Jacobson |
94,000 |
24 |
1 |
36 |
Tina |
. |
57 |
31 |
2 |
24 |
Jake |
Milner |
62 |
. |
dfE_NoH = pd.read_csv('example.csv',header = None)
|
0 |
1 |
2 |
3 |
4 |
0 |
age |
first_name |
last_name |
postTestScore |
preTestScore |
1 |
42 |
Jason |
Miller |
25,000 |
4 |
2 |
52 |
Molly |
Jacobson |
94,000 |
24 |
3 |
36 |
Tina |
. |
57 |
31 |
df = pd.read_csv('example.csv', skiprows = 1,header = None)
|
0 |
1 |
2 |
3 |
4 |
0 |
42 |
Jason |
Miller |
25,000 |
4 |
1 |
52 |
Molly |
Jacobson |
94,000 |
24 |
2 |
36 |
Tina |
. |
57 |
31 |
3 |
24 |
Jake |
Milner |
62 |
. |