Python Forum

Full Version: Auto-headers disable in importing CSV files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
#phython3

Hi when I import my .csv file, it automatically makes my 1st row into headers which is wrong for I do not really have headers for my file. How can I correct this when importing? TIA
what library do you use? csv, pandas, something else?
Im using pandas

import pandas as pd
sample_data = pd.read_csv('myfile.csv')
RTM
pandas doc,
see header and names arguments