Pandas: Calculate the number of votes garnered by 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
Python-Pandas Code Editor:
Sample Table:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
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.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics