Skip to content

Instantly share code, notes, and snippets.

@Kiwibp Kiwibp/

Last active Jun 7, 2018
What would you like to do?
NYCDSA DataViz Project -- BeautifulSoup Code Snippet
guards_advanced = urllib.request.urlopen("").read()
guards_advancedguards_ = bs.BeautifulSoup(guards_advanced, 'lxml')
#leaving out a number of lines necessary to extract data, see github repo for full code if you'd like.
guards_advanced_col_names = col_names.split()
#could also use pandas read_html method as well
guards_advanced_dfs = pd.read_html("")
guards_advanced_stats_df = guards_advanced_dfs[2]
guards_advanced_col_names = pd.Series(guards_advanced_col_names)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.