0

I have a csv file named 'movies'

It has several rows and cols storing different movie info.

Now, I am trying to find the average rating for the movies with less than 400 votes

sample picture

I've already used

df2 = df[df['votes'] < 400]
minorMovies = len(df2.axes[0]);

to find the movies with less than 400 votes and index the total number of movies (less than 400 votes)

How do I use df2 and minorMovies to index the votes correspond to the minorMovies?

Barmar
  • 741,623
  • 53
  • 500
  • 612

0 Answers0