[Python] How to convert index of a pandas dataframe into a column

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

  1. Stack

    Stack Membro Participativo

    How to convert an index of a dataframe into a column?

    For example:

    gi ptt_loc
    0 384444683 593
    1 384444684 594
    2 384444686 596


    to

    index1 gi ptt_loc
    0 0 384444683 593
    1 1 384444684 594
    2 2 384444686 596

    Continue reading...

Compartilhe esta Página