Creating a class in python (Pandas)

Question

You're given the following datasets showing number of homes on the market by metro over time and the number of homes sold over time. Create a line chart showing the ratio of homes sold to homes available for the top 10 metros by homes available, as well as the US aggregate.

To help get you started, below is code (Python) to import the referenced dataset:

# Import libraries
%matplotlib inline
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Import data
df_available = pd.read_csv('https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/zillow_home_on_market.csv')
df_sold = pd.read_csv('https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/zillow_sales_count.csv')

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now