How to avoid NaN index values when Importing from .csv w/o headers to a pandas dataframe?

后端 未结 1 1398
时光取名叫无心
时光取名叫无心 2021-01-26 10:07

I have a .csv file without headers. I want to import it to create a pandas dataframe object.

df1 = pd.read_csv(infile, global_sep, header = 0)


        
相关标签:
1条回答
  • 2021-01-26 10:29

    If you use:

    df1 = pd.read_csv(infile, global_sep, header=None)
    

    It will work.

    0 讨论(0)
提交回复
热议问题