I have a data frame and I droped some part of it. now my new data frame has not all the rows if we consider data frame as a table.

I want to change
1
2
3
11 . . .
to
0
1
2
3
4 . . .
Thanks.
Use reset_index() with the optional parameter drop=True
import pandas as pd
df = pd.DataFrame({
'A0' : list(range(10)),
'A1' : list(range(10)),
'A2' : list(range(10)),
'3A' : list(range(10)),
'A4' : list(range(10)),
'A5' : list(range(10))
})
print(df.head())
# A0 A1 A2 3A A4 A5
# 0 0 0 0 0 0 0
# 1 1 1 1 1 1 1
# 2 2 2 2 2 2 2
# 3 3 3 3 3 3 3
# 4 4 4 4 4 4 4
df = df.iloc[2:4]
print(df)
# A0 A1 A2 3A A4 A5
# 2 2 2 2 2 2 2
# 3 3 3 3 3 3 3
df = df.reset_index(drop=True)
print(df)
# A0 A1 A2 3A A4 A5
# 0 2 2 2 2 2 2
# 1 3 3 3 3 3 3
PandasDtaframe?.reset_index()