Spaces:
Running
Running
Update pitch_summary_functions.py
Browse files
pitch_summary_functions.py
CHANGED
@@ -237,8 +237,8 @@ def df_clean(df):
|
|
237 |
|
238 |
df_copy['pitch_l'] = [1 if x == 'L' else 0 for x in df_copy['pitcher_hand']]
|
239 |
df_copy['bat_l'] = [1 if x == 'L' else 0 for x in df_copy['batter_hand']]
|
240 |
-
df_copy = df_copy[~df_copy.pitch_type.isin(["EP", "PO", "KN", "CS", "SC", "FA"])].reset_index(drop=True)
|
241 |
-
df_copy['pitch_type'] = df_copy['pitch_type'].replace({'FT':'SI'
|
242 |
|
243 |
# df_copy['des_new'] = df_copy['play_description'].map(des_dict)
|
244 |
# df_copy['ev_new'] = df_copy.loc[df_copy['des_new'] == 'hit_into_play','event_type'].map(ev_dict)
|
|
|
237 |
|
238 |
df_copy['pitch_l'] = [1 if x == 'L' else 0 for x in df_copy['pitcher_hand']]
|
239 |
df_copy['bat_l'] = [1 if x == 'L' else 0 for x in df_copy['batter_hand']]
|
240 |
+
#df_copy = df_copy[~df_copy.pitch_type.isin(["EP", "PO", "KN", "CS", "SC", "FA"])].reset_index(drop=True)
|
241 |
+
df_copy['pitch_type'] = df_copy['pitch_type'].replace({'FT':'SI'})
|
242 |
|
243 |
# df_copy['des_new'] = df_copy['play_description'].map(des_dict)
|
244 |
# df_copy['ev_new'] = df_copy.loc[df_copy['des_new'] == 'hit_into_play','event_type'].map(ev_dict)
|