How to do it...

  1. Read in the movie dataset, and select the columns, movie_title, imdb_score, and budget:
>>> movie = pd.read_csv('data/movie.csv')
>>> movie2 = movie[['movie_title', 'imdb_score', 'budget']]
>>> movie2.head()
  1. Use the nlargest method to select the top 100 movies by imdb_score:
>>> movie2.nlargest(100, 'imdb_score').head()
  1. Chain the nsmallest method to return the five lowest budget films among those with a top 100 score:
>>> movie2.nlargest(100, 'imdb_score').nsmallest(5, 'budget')
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.124.145