neelsomani / senator-filings

Scrape public filings of the buy + sell orders of U.S. senators and calculate their returns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeyError

ImportSJC opened this issue · comments

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.

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.