How to skip header and footer data in pandas dataframe?

前端 未结 4 960
孤街浪徒
孤街浪徒 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条回答
  •  甜味超标
    2021-01-04 11:05

    So to summarize. Header location is 15 from the top and Footer location is Y from the bottom. Here's how you import the correct values:

    import pandas as pd
    df=pd.read_excel("File.xls",header=15,skipfooter=_Y_)
    

    Do ensure that your columnar data isn't being excluded!

提交回复
热议问题