DataFrame.reset_index is what you're looking for. If you don't want it saved as a column, then do: df = df.reset_index(drop=True).
確定! 回上一頁