Save all of this director's movies and their ratings in a variable called all_movies_ratings, then print this variable. (The director with the most movies you got from the last question.) # your code here Q6: Recommend a **random** movie that has a rating of over 8.3. Store the random recommendation in a variable called "rand_goodmovie". What is the title and imdb_score of you
Q5:
Save all of this director's movies and their ratings in a variable called all_movies_ratings, then print this variable.
(The director with the most movies you got from the last question.)
# your code here
Q6:
Recommend a **random** movie that has a rating of over 8.3.
Store the random recommendation in a variable called "rand_goodmovie".
What is the title and imdb_score of your recommendation?
Here are the steps:
1. Query the data ('df' DataFrame) for movies with a rating over 8.3 (imdb_score > 8.3)
2. Create a random integer index location to get a single movie recommendation
3. Save the random movie recommendation in a DataFrame called 'rand_goodmovie'
4. Save the title of the random movie recommendation in a variable "random_title" and print it
5. Save the imdb_score of the random movie recommendation in a variable "random_imdb_score" and print it
# Do not modify this part, it's needed for grading
import random
random.seed(0)
# your code here
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images