[Python] How list in pandas dataframe can be converted into multiple cells with no duplicate...

Discussão em 'Python' iniciado por Stack, Abril 30, 2025.

  1. Stack

    Stack Membro Participativo

    I have this kind of data:

    [{"id": 1, "name": "Alex", "projects": ["A", "B", "C"]}, {"id": 2, "name": "Bob", "projects": None}]


    And I need .xslx in this format:

    [​IMG]

    Each element of the list in a separate row but without other columns getting duplicated(merged cells)

    But I need to achieve this a dynamic way, I won't have cell indices statically and finding those cell indices will a bit too complex.

    I use pandas and xlswriter as engine to generate the .xlsx file. I can use other modules if needed.

    Continue reading...

Compartilhe esta Página