[Python] How to create a dictionary of two pandas DataFrame columns

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    What is the most efficient way to organise the following pandas Dataframe:

    data =

    Position Letter
    1 a
    2 b
    3 c
    4 d
    5 e


    into a dictionary like alphabet[1 : 'a', 2 : 'b', 3 : 'c', 4 : 'd', 5 : 'e']?

    Continue reading...

Compartilhe esta Página