Normalizing median housing price

Question

You're given the following datasets showing consumer price index (e.g. inflation rates) and median house sales prices in the US and diabetic information for hypothetical countries.

Using these two datasets, normalize the median house sales prices for inflation between the years 2000 and 2020.

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 data
df_cpi = pd.read_csv('https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/inflation_consumer_price_index.csv')
df_sales = pd.read_csv('https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/median_sales_house.csv')

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now