Spaces:
Build error
Build error
James McCool
commited on
Commit
·
5d83f16
1
Parent(s):
86d9bdc
Enhance data filtering in hitter tab of Streamlit app
Browse files- Added filtering for the 'Set' column to ensure data consistency based on user selection.
- Removed unnecessary columns from the displayed data, streamlining the information presented to users and improving clarity.
- src/streamlit_app.py +4 -0
src/streamlit_app.py
CHANGED
|
@@ -204,6 +204,8 @@ with hitter_tab:
|
|
| 204 |
if position_var_hitter:
|
| 205 |
position_mask = disp_raw['Position'].apply(lambda x: any(pos in x for pos in position_var_hitter))
|
| 206 |
disp_raw = disp_raw[position_mask]
|
|
|
|
|
|
|
| 207 |
|
| 208 |
elif table_var_hitter == 'Active Baselines':
|
| 209 |
disp_raw = hitter_info
|
|
@@ -214,6 +216,8 @@ with hitter_tab:
|
|
| 214 |
if position_var_hitter:
|
| 215 |
position_mask = disp_raw['Position'].apply(lambda x: any(pos in x for pos in position_var_hitter))
|
| 216 |
disp_raw = disp_raw[position_mask]
|
|
|
|
|
|
|
| 217 |
|
| 218 |
elif table_var_hitter == 'League Aggregate Baselines':
|
| 219 |
disp_raw = hitter_agg
|
|
|
|
| 204 |
if position_var_hitter:
|
| 205 |
position_mask = disp_raw['Position'].apply(lambda x: any(pos in x for pos in position_var_hitter))
|
| 206 |
disp_raw = disp_raw[position_mask]
|
| 207 |
+
|
| 208 |
+
disp_raw = disp_raw[disp_raw['Set'] == site_var_hitter]
|
| 209 |
|
| 210 |
elif table_var_hitter == 'Active Baselines':
|
| 211 |
disp_raw = hitter_info
|
|
|
|
| 216 |
if position_var_hitter:
|
| 217 |
position_mask = disp_raw['Position'].apply(lambda x: any(pos in x for pos in position_var_hitter))
|
| 218 |
disp_raw = disp_raw[position_mask]
|
| 219 |
+
|
| 220 |
+
disp_raw = disp_raw.drop(columns = ['DK_SD_Salary', 'FD_SD_Salary', 'DK_Own', 'FD_Own', 'DK_player_ID', 'FD_player_ID', 'Opp_TT'])
|
| 221 |
|
| 222 |
elif table_var_hitter == 'League Aggregate Baselines':
|
| 223 |
disp_raw = hitter_agg
|