nesticot commited on
Commit
1464a2b
·
verified ·
1 Parent(s): 291ff67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -32,26 +32,26 @@ dataset_train = dataset['train']
32
  df_2023_mlb = dataset_train.to_pandas().set_index(list(dataset_train.features.keys())[0]).reset_index(drop=True)
33
 
34
 
35
- from api_scraper import MLB_Scrape
36
- mlb_stats = MLB_Scrape()
37
- schedule_spring = mlb_stats.get_schedule(year_input=2024,
38
- sport_id=1,
39
- start_date='2024-01-01',
40
- end_date='2024-12-31',
41
- final=False,
42
- regular=True,
43
- spring=False)
44
-
45
- schedule_spring = schedule_spring.drop_duplicates(subset=['game_id'])
46
-
47
- schedule_spring = schedule_spring[(schedule_spring['date']==(datetime.today() - timedelta(hours=8)).date())]
48
-
49
-
50
- data = mlb_stats.get_data(schedule_spring.game_id[:].values)
51
- df_2023_new = mlb_stats.get_data_df(data_list = data)
52
- df_2023 = pd.concat([df_2023_mlb,df_2023_new])
53
- df_2023 = df_2023.drop_duplicates(subset=['play_id'],keep='last')
54
- df_2023_mlb = pd.concat([df_2023_mlb,df_2023_new])
55
 
56
 
57
  # ### Import Datasets
 
32
  df_2023_mlb = dataset_train.to_pandas().set_index(list(dataset_train.features.keys())[0]).reset_index(drop=True)
33
 
34
 
35
+ # from api_scraper import MLB_Scrape
36
+ # mlb_stats = MLB_Scrape()
37
+ # schedule_spring = mlb_stats.get_schedule(year_input=2024,
38
+ # sport_id=1,
39
+ # start_date='2024-01-01',
40
+ # end_date='2024-12-31',
41
+ # final=False,
42
+ # regular=True,
43
+ # spring=False)
44
+
45
+ # schedule_spring = schedule_spring.drop_duplicates(subset=['game_id'])
46
+
47
+ # schedule_spring = schedule_spring[(schedule_spring['date']==(datetime.today() - timedelta(hours=8)).date())]
48
+
49
+
50
+ # data = mlb_stats.get_data(schedule_spring.game_id[:].values)
51
+ # df_2023_new = mlb_stats.get_data_df(data_list = data)
52
+ # df_2023 = pd.concat([df_2023_mlb,df_2023_new])
53
+ # df_2023 = df_2023.drop_duplicates(subset=['play_id'],keep='last')
54
+ # df_2023_mlb = pd.concat([df_2023_mlb,df_2023_new])
55
 
56
 
57
  # ### Import Datasets