I have dataframe(ratings_base
) which contains 100000 rows. I am filtering one row from it and I used following code segment for it.
((ratings_base.loc[ratings_base['user_id'] == 1]).sort_values(by='rating', ascending=0)).iloc[0]
which returns me a Series
object.
user_id 1
movie_id 170
rating 5
Name: 19996, dtype: int64
How can I delete this row(Series object) from my original dataframe object ? I can use dataframe's drop function but I need row index for it. If I can get the row index of the selected row (I can see it appears as the Name attribute of the Series object), I can drop it.