[Python] Start row index from 1 instead of zero without creating additional column in pandas

Discussão em 'Python' iniciado por Stack, Junho 25, 2025.

  1. Stack

    Stack Membro Participativo

    I know that I can reset the indices like so

    df.reset_index(inplace=True)


    but this will start the index from 0. I want to start it from 1. How do I do that without creating any extra columns and by keeping the index/reset_index functionality and options? I do not want to create a new dataframe, so inplace=True should still apply.

    Continue reading...

Compartilhe esta Página