Skip to content

Instantly share code, notes, and snippets.

@BlackArbsCEO
Last active November 26, 2018 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save BlackArbsCEO/583c0671742790205d42 to your computer and use it in GitHub Desktop.
Save BlackArbsCEO/583c0671742790205d42 to your computer and use it in GitHub Desktop.
Simple Linear Regression comparing NFL Quarterback Win Percentage vs. Touchdown to Interception ratio using data collected from Pro-football-reference.com
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergiolucero
Copy link

Kudos! This is a great project, but I would greatly simplify the code. Did you know, for instance, that df[chosen_columns] is equivalent to your df.iloc[:,chosen_columns]? Also on cell two I would use list comprehensions and type
dats = [p.read_excel(os.path.join(ROOT, folders[0],'\qb_passing_stats.xlsx', sheetname=str(year),...)) for year in range(2012,2016)]

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