[Python] How to convert a dataframe to a dictionary

Discussão em 'Python' iniciado por Stack, Março 16, 2025.

  1. Stack

    Stack Membro Participativo

    I have a dataframe with two columns and I intend to convert it to a dictionary. The first column will be the key and the second will be the value.

    Dataframe:

    id value
    0 0 10.2
    1 1 5.7
    2 2 7.4


    How can I do this?

    Continue reading...

Compartilhe esta Página