Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -164,9 +164,11 @@ with col1:
|
|
| 164 |
|
| 165 |
if split_var3 == 'Specific Dates':
|
| 166 |
low_date = st.date_input('Min Date:', value=None, format="YYYY-MM-DD", key='low_date')
|
| 167 |
-
low_date
|
|
|
|
| 168 |
high_date = st.date_input('Max Date:', value=None, format="YYYY-MM-DD", key='high_date')
|
| 169 |
-
high_date
|
|
|
|
| 170 |
elif split_var3 == 'All':
|
| 171 |
low_date = gamelog_table['Date'].min()
|
| 172 |
high_date = gamelog_table['Date'].max()
|
|
@@ -184,6 +186,12 @@ with col2:
|
|
| 184 |
display.dataframe(season_long_table.style.format(precision=2), use_container_width = True)
|
| 185 |
|
| 186 |
elif split_var1 == 'Gamelogs':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
display = st.container()
|
| 188 |
|
| 189 |
bottom_menu = st.columns((4, 1, 1))
|
|
@@ -198,12 +206,7 @@ with col2:
|
|
| 198 |
)
|
| 199 |
with bottom_menu[0]:
|
| 200 |
st.markdown(f"Page **{current_page}** of **{total_pages}** ")
|
| 201 |
-
|
| 202 |
-
gamelog_table = gamelog_table[gamelog_table['Date'] <= high_date]
|
| 203 |
-
gamelog_table = gamelog_table[gamelog_table['Min'] >= min_var1[0]]
|
| 204 |
-
gamelog_table = gamelog_table[gamelog_table['Min'] <= min_var1[1]]
|
| 205 |
-
gamelog_table = gamelog_table[gamelog_table['Team'].isin(team_var1)]
|
| 206 |
-
gamelog_table = gamelog_table.reset_index(drop=True)
|
| 207 |
|
| 208 |
pages = split_frame(gamelog_table, batch_size)
|
| 209 |
# pages = pages.set_index('Player')
|
|
|
|
| 164 |
|
| 165 |
if split_var3 == 'Specific Dates':
|
| 166 |
low_date = st.date_input('Min Date:', value=None, format="YYYY-MM-DD", key='low_date')
|
| 167 |
+
if low_date is not None:
|
| 168 |
+
low_date = pd.to_datetime(low_date).date()
|
| 169 |
high_date = st.date_input('Max Date:', value=None, format="YYYY-MM-DD", key='high_date')
|
| 170 |
+
if high_date is not None:
|
| 171 |
+
high_date = pd.to_datetime(high_date).date()
|
| 172 |
elif split_var3 == 'All':
|
| 173 |
low_date = gamelog_table['Date'].min()
|
| 174 |
high_date = gamelog_table['Date'].max()
|
|
|
|
| 186 |
display.dataframe(season_long_table.style.format(precision=2), use_container_width = True)
|
| 187 |
|
| 188 |
elif split_var1 == 'Gamelogs':
|
| 189 |
+
gamelog_table = gamelog_table[gamelog_table['Date'] >= low_date]
|
| 190 |
+
gamelog_table = gamelog_table[gamelog_table['Date'] <= high_date]
|
| 191 |
+
gamelog_table = gamelog_table[gamelog_table['Min'] >= min_var1[0]]
|
| 192 |
+
gamelog_table = gamelog_table[gamelog_table['Min'] <= min_var1[1]]
|
| 193 |
+
gamelog_table = gamelog_table[gamelog_table['Team'].isin(team_var1)]
|
| 194 |
+
gamelog_table = gamelog_table.reset_index(drop=True)
|
| 195 |
display = st.container()
|
| 196 |
|
| 197 |
bottom_menu = st.columns((4, 1, 1))
|
|
|
|
| 206 |
)
|
| 207 |
with bottom_menu[0]:
|
| 208 |
st.markdown(f"Page **{current_page}** of **{total_pages}** ")
|
| 209 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
|
| 211 |
pages = split_frame(gamelog_table, batch_size)
|
| 212 |
# pages = pages.set_index('Player')
|