Pandas: reading Excel file starting from the row below that with a specific value

前端 未结 3 715
别那么骄傲
别那么骄傲 2021-01-12 21:41

Say I have the following Excel file:

    A      B     C
0   -      -     -
1   Start  -     -
2   3      2     4
3   7      8     4
4   11     2     17
         


        
3条回答
  •  庸人自扰
    2021-01-12 21:58

    If you know the specific rows you are interested in, you can skip from the top using skiprow and then parse only the row (or rows) you want using nrows - see pandas.read_excel

    df = pd.read_excel('myfile.xlsx', 'Sheet1', skiprows=2, nrows=3,)
    

提交回复
热议问题