drop()
function in Pandas doesn't add new rows, it does the opposite as your understanding. (Documentation: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.drop.html)
From my speculation, the number 130398
is from df_final
from the previous cell. While df_final=df.drop(df[df.play_count> 5].index)
, you use the original df
instead of df_final
that you observed the number of rows.
Try running the df_final
again and making sure that it has the right number of rows, then probably try using:
df_final = df_final.drop(df_final[df_final.play_count> 5].index)