# This will get executed each time the exercise gets initialized.
## Start by defining a simple dictionary
x = {'y' : ['A', 'B', 'C', 'A', 'B', 'C'],
'z' : ['D', 'E', 'F', 'D', 'E', 'F']}
import pandas as pd
x = pd.DataFrame(x) # format x as DataFrame
y_freq = x['y'].value_counts() # pass column 'y' of DataFrame x to value_counts
## To find the proportion of y that is A
num = y_freq['A']
print('Numerator = ', num)
den = sum(y_freq)
print('Denominator = ', den)
prop = num/den
print('Proportion = ', round(prop, 3))