Update stuff_model/calculate_arm_angles.py
Browse files
stuff_model/calculate_arm_angles.py
CHANGED
|
@@ -13,6 +13,7 @@ def calculate_arm_angles(df: pl.DataFrame,pitcher_id:int) -> pl.DataFrame:
|
|
| 13 |
|
| 14 |
response = requests.get(url, headers=headers)
|
| 15 |
|
|
|
|
| 16 |
daily_check = df['game_date'][0] == df['game_date'][-1]
|
| 17 |
|
| 18 |
# Assuming response.text contains the CSV formatted string
|
|
@@ -23,7 +24,7 @@ def calculate_arm_angles(df: pl.DataFrame,pitcher_id:int) -> pl.DataFrame:
|
|
| 23 |
|
| 24 |
# Read the CSV data into a DataFrame
|
| 25 |
df_arm_angle = pl.read_csv(data)
|
| 26 |
-
|
| 27 |
if pitcher_id not in df_arm_angle["pitcher"]:
|
| 28 |
old_data = True
|
| 29 |
df_arm_angle = pl.read_csv('stuff_model/pitcher_arm_angles_2024.csv')
|
|
|
|
| 13 |
|
| 14 |
response = requests.get(url, headers=headers)
|
| 15 |
|
| 16 |
+
old_data = False
|
| 17 |
daily_check = df['game_date'][0] == df['game_date'][-1]
|
| 18 |
|
| 19 |
# Assuming response.text contains the CSV formatted string
|
|
|
|
| 24 |
|
| 25 |
# Read the CSV data into a DataFrame
|
| 26 |
df_arm_angle = pl.read_csv(data)
|
| 27 |
+
|
| 28 |
if pitcher_id not in df_arm_angle["pitcher"]:
|
| 29 |
old_data = True
|
| 30 |
df_arm_angle = pl.read_csv('stuff_model/pitcher_arm_angles_2024.csv')
|