How to read Pandas csv file with no header?

0 votes
I have a csv file that I am importing in my Python script using pandas. The csv file start with cell values and doesn’t contain headings. Pandas is considering the first row value as heading. How to read csv without heading?
Apr 3 in Python by Raj
372 views

1 answer to this question.

0 votes

You can set the header option to None to ignore header.

file = pd.read_csv('Diabetes.csv', header=1)
answered Apr 3 by Shri

Related Questions In Python

0 votes
1 answer

How to create blank csv file in pandas?

Try this code: open("User data.csv", 'w') Where User data.csv ...READ MORE

answered Apr 5 in Python by Will
517 views
0 votes
2 answers

How to check if a csv file is empty in pandas?

Try this: df = pd.DataFrame(columns=['Name', 'ID', 'Department']) if df.empty ...READ MORE

answered Jul 1 in Python by Bob
239 views
0 votes
1 answer
+1 vote
4 answers

How to write nested dictionaries to a CSV file

Using DictWriter there is no need in ...READ MORE

answered Oct 18, 2018 in Python by Richard William
4,788 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 223 views
+4 votes
6 answers
0 votes
1 answer

How to print just one column in pandas?

You can use the header to print ...READ MORE

answered Apr 3 in Python by TIna
55 views
0 votes
1 answer

How to install tkinter in pycharm?

Ya, this is a problem with installing ...READ MORE

answered Apr 3 in Python by Jishan
4,445 views