[Python] reading excel to a python data frame starting from row 5 and including headers

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have an excel workbook that runs some vba on opening which refreshes a pivot table and does some other stuff.

    Then I wish to import the results of the pivot table refresh into a dataframe in python for further analysis.

    import xlrd

    wb = xlrd.open_workbook('C:\Users\cb\Machine_Learning\cMap_Joins.xlsm')


    The refreshing and opening of the file works fine. But how do I select the data from the first sheet from say row 5 including header down to last record n.

    Continue reading...

Compartilhe esta Página