When pandas are used for excel reading, the indexing begins with line 2.



  • I use the pandas library for excel file. But somehow he ignores the first line in excel and allows us to contact the cells from the second.

    data = pd.read_excel(path, engine='openpyxl')
    print(data.iloc[0, 7])
    

    In this case, it issues the value of the 2nd line of the 7th cell. How do you turn to line one?



  • In default, the first line is considered a headline. Tell me you don't have a title like:

    data = pd.read_excel(path, header=None, engine='openpyxl')
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2