Spaces:
Running
Running
Commit
·
ca90f5c
1
Parent(s):
3822cd2
Fix AIR% percentile ordering
Browse files
stats.py
CHANGED
|
@@ -241,7 +241,7 @@ def compute_player_stats(data, player_type, qual='qualified', pitcher_lr='both',
|
|
| 241 |
if pitching:
|
| 242 |
stat_descending_pctl = lambda stat: stat in ['BB%', 'Ball%', 'FB%', 'LD%', 'OFFB%', 'AIR%', 'Z-Swing%', 'Behind%', 'OBP'] or 'Contact%' in stat
|
| 243 |
else:
|
| 244 |
-
stat_descending_pctl = lambda stat: not (stat in ['BB%', 'Ball%', 'FB%', 'LD%', 'OFFB%', 'AIR%' 'Swing%', 'Z-Swing%', 'Behind%', 'OBP'] or 'Contact%' in stat)
|
| 245 |
|
| 246 |
# col names
|
| 247 |
match player_type:
|
|
|
|
| 241 |
if pitching:
|
| 242 |
stat_descending_pctl = lambda stat: stat in ['BB%', 'Ball%', 'FB%', 'LD%', 'OFFB%', 'AIR%', 'Z-Swing%', 'Behind%', 'OBP'] or 'Contact%' in stat
|
| 243 |
else:
|
| 244 |
+
stat_descending_pctl = lambda stat: not (stat in ['BB%', 'Ball%', 'FB%', 'LD%', 'OFFB%', 'AIR%', 'Swing%', 'Z-Swing%', 'Behind%', 'OBP'] or 'Contact%' in stat)
|
| 245 |
|
| 246 |
# col names
|
| 247 |
match player_type:
|