@@ -659,9 +659,44 @@ def league_leaders(leaderCategories,leagueId=None,season=None):
659
659
return "This function is not yet available."
660
660
661
661
def standings (leagueId = None ,season = None ,standingsTypes = None ,date = None ):
662
- """Get standings for a given league and season.
662
+ """Get formatted standings for a given league and season.
663
+ Will include division and wildcard standings
663
664
664
665
Format for date = 'MM/DD/YYYY', e.g. '04/24/2019'
666
+
667
+ Example use:
668
+
669
+ Print National League standings from 09/27/2008
670
+
671
+ print( statsapi.standings(leagueId=104,date='09/27/2008') )
672
+
673
+ Output:
674
+
675
+ National League Central
676
+ Rank Team W L GB (E#) WC Rank WC GB (E#)
677
+ 1 Chicago Cubs 97 63 - - - - -
678
+ 2 Milwaukee Brewers 89 72 8.5 E 1 - -
679
+ 3 Houston Astros 85 75 12.0 E 3 3.5 E
680
+ 4 St. Louis Cardinals 85 76 12.5 E 4 4.0 E
681
+ 5 Cincinnati Reds 74 87 23.5 E 7 15.0 E
682
+ 6 Pittsburgh Pirates 66 95 31.5 E 11 23.0 E
683
+
684
+ National League West
685
+ Rank Team W L GB (E#) WC Rank WC GB (E#)
686
+ 1 Los Angeles Dodgers 84 77 - - - - -
687
+ 2 Arizona Diamondbacks 81 80 3.0 E 6 8.0 E
688
+ 3 Colorado Rockies 74 87 10.0 E 8 15.0 E
689
+ 4 San Francisco Giants 71 90 13.0 E 10 18.0 E
690
+ 5 San Diego Padres 63 98 21.0 E 12 26.0 E
691
+
692
+ National League East
693
+ Rank Team W L GB (E#) WC Rank WC GB (E#)
694
+ 1 Philadelphia Phillies 91 70 - - - - -
695
+ 2 New York Mets 89 72 2.0 E 2 - -
696
+ 3 Florida Marlins 83 77 7.5 E 5 5.5 E
697
+ 4 Atlanta Braves 72 89 19.0 E 9 17.0 E
698
+ 5 Washington Nationals 59 101 31.5 E 13 29.5 E
699
+
665
700
"""
666
701
if not leagueId : leagueId = '103,104'
667
702
params = {'leagueId' :leagueId }
0 commit comments