[Python] Convert a dict of excel sheets to DataFrames efficiently

Discussão em 'Python' iniciado por Stack, Outubro 6, 2024.

  1. Stack

    Stack Membro Participativo

    I have used

    my_dict = ExcelFile(xls, None)


    to create a dictionary of excel sheets. The key being the name of the sheet. How can I use a list of the dict keys to create a df for each sheet? I tried using something like:

    for sheet in keys:
    df_sheet = my_dict[sheet]


    There might be an even easier function for this specific task, but in your answer can you include a way to solve it using a loop like above?

    Continue reading...

Compartilhe esta Página