KeyError
ImportSJC opened this issue · comments
Stephen Cerbone commented
In the last cell on the following line I get a KeyError:
plot_senator_growth(senator_tx_growth['Angus S King, Jr.'])
KeyError Traceback (most recent call last)
<ipython-input-15-158f4a2ee1d2> in <module>
----> 1 plot_senator_growth(senator_tx_growth['Angus S King, Jr.'])
KeyError: 'Angus S King, Jr.'
Likely due to the punctuation in the name, the comma and the period. Probably should do some cleaning on the names.
Neel Somani commented
Would it be possible for you to print the keys for the dictionary senator_tx_growth
? I don't think the comma or period should make a difference.