How to add header row to a pandas DataFrame

后端 未结 4 2063
梦谈多话
梦谈多话 2020-11-28 17:54

I am reading a csv file into pandas. This csv file constists of four columns and some rows, but does not have a header row, which I want to add. I have been try

4条回答
  •  孤街浪徒
    2020-11-28 18:46

    col_Names=["Sequence", "Start", "End", "Coverage"]
    my_CSV_File= pd.read_csv("yourCSVFile.csv",names=col_Names)
    

    having done this, just check it with[well obviously I know, u know that. But still...

    my_CSV_File.head()
    

    Hope it helps ... Cheers

提交回复
热议问题