-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.py
37 lines (28 loc) · 828 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""Example usage of the baseball_stats_python package."""
from src.baseball_stats_python import (
minor_statcast_search,
mlbam_id_search,
statcast_search,
)
from src.baseball_stats_python.enums.minor import MinorGameType
from src.baseball_stats_python.enums.statcast import GameType, MlbTeam, Month
def example():
df = statcast_search(
season='2023',
pitchers_lookup='477132',
game_type=[GameType.PLAYOFFS, 'R'],
opponent=MlbTeam.PADRES,
month=Month.JUNE,
)
print(df)
def minor_example():
df = minor_statcast_search(
season='2023', game_type=MinorGameType.REGULAR_SEASON, pitchers_lookup='678906'
)
print(df)
def mlbam_id_example():
df = mlbam_id_search('Reynolds')
print(df)
# example()
# minor_example()
# mlbam_id_example()