Home > Back-end >  How to reindex the rows in excel using python
How to reindex the rows in excel using python

Time:06-16

I have a modifed df but the rows index is changed so how to let it start from 0 and so on

Example :

2 Mc-system commercial

3 Mf-System educational

20 Mk-system fundemntal

I want it to be like this :

0 Mc-system commercial

1 Mf-System educational

2 Mk-system fundemntal

So that the row index is organized

CodePudding user response:

use dataframe.reset_index

df.reset_index(drop=True)
  • Related