Pandas: Calculate the number of votes garnered by the 70% movie
15. Calculate Votes for the 70% Movie
Write a Pandas program to calculate the number of votes garnered by the 70% movie.
Sample Solution:
Python Code :
import pandas as pd
df = pd.read_csv('movies_metadata.csv')
result = df['vote_count'].quantile(0.70)
print(result)
Sample Output:
402.6999999999999
For more Practice: Solve these Related Problems:
- Write a Pandas program to identify the movie that has achieved a 70% vote average and display its total vote count.
- Write a Pandas program to filter movies_metadata.csv for movies with a vote_average of 7.0 (or 70% if scaled) and then sum the votes.
- Write a Pandas program to locate the movie with a vote_average near 70% and compare its vote_count with the dataset’s average vote_count.
- Write a Pandas program to retrieve and display detailed statistics for the movie(s) with a vote average equal to 70%.
Go to:
Previous: Write a Python Pandas program to get the longest runtime and shortest runtime.
Next: Write a Python Pandas program to display the movies (title, runtime) longer than 30 minutes and shorter than 360 minutes.
Python-Pandas Code Editor:
Sample Table:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.