""Q1: Is how much a movie makes indicative of how good it is? Make a simple scatter plot comparing gross to imdb_score for movies during or after 2000 (title_year >= 2000) and before 2000 (title_year < 2000). It may be useful to scale the x axis demarking gross. (Hint: Divide the gross amount by 1,000,000.) Remember to put a legend indicating which color corresponds to which years. What is your verdict? Save your plot in a variable called plt1, and your dataframes in variables called df_after_2000 and df_before_2000 """ import matplotlib.pyplot as plt1 # your code here plt1.show()
Please help with the 1 Python question
Data File: https://docs.google.com/spreadsheets/d/1-S_xnAQXa1QCoWQt7xyvxo42XRNC1QBd/edit?usp=sharing&ouid=112107649557425878726&rtpof=true&sd=true
%%capture
###########################################################
### EXECUTE THIS CELL BEFORE YOU TO TEST YOUR SOLUTIONS ###
###########################################################
import imp, os, sys
sol = imp.load_compiled("solutions", "./solutions.py")
sol.get_solutions("imdb.xlsx")
from nose.tools import assert_equal
from pandas.util.testing import assert_frame_equal, assert_series_equal
# Loading the data
import pandas as pd
import numpy as np
xls = pd.ExcelFile('imdb.xlsx')
df = xls.parse('imdb')
df_directors = xls.parse('directors')
df_countries = xls.parse('countries')
df = pd.merge(left=df, right=df_countries,
how='inner', left_on='country_id',
right_on='id')
df = pd.merge(left=df, right=df_directors,
how='inner', left_on='director_id',
right_on='id')
print("Finished.")
"""Q1:
Is how much a movie makes indicative of how good it is?
Make a simple scatter plot comparing gross to imdb_score for movies during or after 2000 (title_year >= 2000) and before 2000 (title_year < 2000).
It may be useful to scale the x axis demarking gross. (Hint: Divide the gross amount by 1,000,000.)
Remember to put a legend indicating which color corresponds to which years.
What is your verdict?
Save your plot in a variable called plt1, and your dataframes in variables called df_after_2000 and df_before_2000
"""
import matplotlib.pyplot as plt1
# your code here
plt1.show()
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images