Skip to content

A pleasant Python interface to sports-reference.com websites

License

Notifications You must be signed in to change notification settings

double-dose-larry/sportsref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sportsref

easily pull stats from sports-reference web sites

sportsref is designed to be used in an interactive python environment, such as IPython or JupyterNotebook

The api tries to mirror the web experience:

  • each subject area (i.e. player, season, league) is represented by an class.
  • each class has methods representing the pages available.
    • for example Ozzie Albies player page has the following menu of pages albies pages
    • if the menu is a dropdown, such as the Splits menu on the player page the method takes an additional parameter or two
  • the methods return a Page object which know about all the tables on that page
  • use the Page.get_df("table_name") to get a pandas.DataFrame of the table you want.

The examples.ipynb JupyterNotebook has a few examples demonstrating a workflow.

Install

clone the repo then

pip install .

About

A pleasant Python interface to sports-reference.com websites

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published