Using the 2013_NYC_CD_MedianIncome_Recycle.xlsx file, calculate the correlation between the recycling rate and the median income. Discuss your findings in your PR.
In [10]:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
%matplotlib inline
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
In [2]:
df = pd.read_excel('2013_NYC_CD_MedianIncome_Recycle.xlsx')
In [3]:
df.head()
Out[3]:
In [4]:
df.columns = ['name', 'median_household_income', 'recycle_rate']
In [5]:
df.head()
Out[5]:
In [7]:
df.corr()
Out[7]:
In [19]:
In [ ]: