Skip to content

Instantly share code, notes, and snippets.

@jbarton311
Created April 6, 2019 19:26
Show Gist options
  • Save jbarton311/47dd7fbf37c3714dd0c22b8c711fe9ee to your computer and use it in GitHub Desktop.
Save jbarton311/47dd7fbf37c3714dd0c22b8c711fe9ee to your computer and use it in GitHub Desktop.
pull golf world rankings
import pandas as pd
# Started by Googling "World Golf Rankings"
# Clicked on 1st site I found
# Needed to expand the ranking table to "all"
data = pd.read_html('http://www.owgr.com/ranking?pageNo=1&pageSize=All&country=All')
# pd.read_html will return a list of data frames
# usually you need to go through this list to find the data
# you are looking for
rankings_df = data[0]
# This dataframe will need a little clean up but the data is there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment