Bobbi Towers / May 20 2019

Function domains

models the leading number of home runs for season of the National League between the years , according to the table.

import plotly.figure_factory as ff

table_data = [['Season', 'Player', '# of Home Runs', 'Team'],
              [2000, 'Sammy Sosa', 50, 'Chicago'],
              [2001, 'Barry Bonds', 73, 'San Francisco'],
              [2002, 'Sammy Sosa', 49, 'Chicago'], 
              [2003, 'Jim Thome', 47, 'Philadelphia'],
              [2004, 'Adrian Beltre', 48, 'Los Angeles'],
              [2005, 'Andruw Jones', 51, 'Atlanta'],
              [2006, 'Ryan Howard', 58, 'Philadelphia'],
              [2007, 'Prince Fielder', 50, 'Milwaukee'],
              [2008, 'Ryan Howard', 48, 'Philadelphia'],
              [2009, 'Albert Pujols', 47, 'St. Louis'],
              [2010, 'Albert Pujols', 42, 'St. Louis']]

ff.create_table(table_data, index=False)