import pandas as pd
import matplotlib.pyplot as plt

# Extract the maximum temperature in August 2010 from df_climate: august_max
august_max = df_climate.loc['2010-Aug','Temperature'].max()
print(august_max)

# Resample August 2011 temps in df_clean by day & aggregate the max value: august_2011
august_2011 = df_clean.loc['2011-Aug','dry_bulb_faren'].resample('D').max()


# Filter for days in august_2011 where the value exceeds august_max: august_2011_high

august_2011_high = august_2011.loc[august_2011 > august_max] 

# Construct a CDF of august_2011_high
august_2011_high.plot(kind = 'hist', bins = 25, normed = True, cumulative = True)

# Display the plot
plt.show()
