Sometimes, we want to use Python Pandas to read in table without headers.
In this article, we’ll look at how to use Python Pandas to read in table without headers.
How to use Python Pandas to read in table without headers?
To use Python Pandas to read in table without headers, we can use the read_csv
method with the header
argument set to None
.
For instance, we write
df = pd.read_csv(file_path, header=None, usecols=[3,6])
to call read_csv
with the CSV file_path
and header
set to None
to skip the header when reading the CSV.
Conclusion
To use Python Pandas to read in table without headers, we can use the read_csv
method with the header
argument set to None
.