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

Add file type 'html' #662

Open
sfsinger19103 opened this issue Apr 23, 2021 · 1 comment
Open

Add file type 'html' #662

sfsinger19103 opened this issue Apr 23, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sfsinger19103
Copy link
Contributor

import pandas as pd
url = “https://www.votecnmi.gov.mp/election-2020”
df_list = pd.read_html(url, match=“CANDIDATE”)

This code gives a list of data frames, one for each table in the html that has the word "CANDIDATE" in it. More generally, can use a regex to identify tables.

So can add a file_type=html option, with the usual other parameters.

@sfsinger19103 sfsinger19103 added the enhancement New feature or request label Apr 23, 2021
@sfsinger19103
Copy link
Contributor Author

Instead of pulling the html directly from the web server into pandas data frames, pull html into a file, documented in the usual way, and then process.

@sfsinger19103 sfsinger19103 self-assigned this Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant