how to reset index pandas dataframe after dropna() pandas dataframe
The code you’ve posted already does what you want, but does not do it “in place.” Try adding inplace=True to reset_index() or else reassigning the result to df_all. Note that you can also use inplace=True with dropna(), so: Does it all in place. Or, to reassign df_all.