Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website seems to have changed. #7

Open
kwhkim opened this issue Oct 6, 2020 · 0 comments
Open

Website seems to have changed. #7

kwhkim opened this issue Oct 6, 2020 · 0 comments

Comments

@kwhkim
Copy link

kwhkim commented Oct 6, 2020

Chapter 9, Comparing President Trump's and Obama's approval ratings

Code below does not work any more,

base_url = 'http://www.presidency.ucsb.edu/data/popularity.php?pres={}'
trump_url = base_url.format(45)

df_list = pd.read_html(trump_url)
len(df_list)

resulting in ValueError: No tables found

Can you share the data in csv format or modify the source code to work with the present website?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant