A header is a file row containing names or other metadata that describe tabular columns. When importing CSV data with pandas, specify whether headers exist and which row contains them. section 3.0
Assigning column names while importing
A weather file can use its first row as headers while selecting columns by position and assigning explicit names: pd.read_csv(filename, usecols=[0, 1, 2], header=0, names=['date_time', 'mintemp', 'maxtemp']). The resulting DataFrame has named columns, a parsed datetime column, and a datetime index. section 11.6
Treat header handling as part of knowing the data: inspect the file’s structure before loading it, especially when deciding which columns and types to import. section 3.0
pd.read_csv('mydata.csv', #1
sep='\t', #2
index_col='w', #3
usecols=['w', 'x', 'z'], #4
header=0) #5
Compare header with separator, index-column, and selected-column options in one concrete CSV import. section 3.0


