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)