The problem is I have a dataset as follows from a csv
viewer id movie id movie Name rating
1 2 XXX 4
1 3 DDD 3
1 4 YYY 5
2 2 XXX 4
3 2 XXX Not Available
I'm trying to find all movies that have at least 2 ratings AND that have an average rating of 4. Under the rating column there are also 'Not available' values. With Pandas, I'd like to show that the movie here which would be found with a query is XXX
I tried using groupby but am not able to also include the average rating. I converted the Not available rating to nan to get rid of the 'object' issue stopping me from calculating a mean.