How to skip header and footer data in pandas dataframe?

前端 未结 4 932
孤街浪徒
孤街浪徒 2021-01-04 10:44

I have first 15 rows of a excel file as \"Header data\". and after 235 rows, \"Footer data\". I need to read data in between these header and footer da

4条回答
  •  -上瘾入骨i
    2021-01-04 11:10

    You can also do this after loading the file:

    df=df[(df.index>15)&(df.index<236)]
    df.index-=16
    

提交回复
热议问题