xxxxxxxxxx
see the difference between these two lines
#no header
data= pd.read_csv(path, header = None, delim_whitespace=True, error_bad_lines=False)
#with headers
data= pd.read_csv(path, delim_whitespace=True, error_bad_lines=False)
xxxxxxxxxx
# best practice is to use the `header=None` parameter
# this way, the initial header will turn into the first row in the dataframe
df = pd.read_csv(file, header=None)
xxxxxxxxxx
import pandas as pd
# Assuming your DataFrame is named 'df'
first_row = df.iloc[0]
# Print the first row
print(first_row)