Pandas > Reset index

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,10,size=(5, 3)), columns=['C1','C2','C3'])
dataframe = dataframe.drop(2, 0)
dataframe = dataframe.drop(3, 0)
print ("dataframe")
print (dataframe)
print ("dataframe reindex")
print (dataframe.reset_index(drop=True))
dataframe
   C1  C2  C3
0   7   8   4
1   9   6   1
4   7   9   5
dataframe reindex
   C1  C2  C3
0   7   8   4
1   9   6   1
2   7   9   5