Spaces:
Running
Running
Jon Solow
commited on
Commit
·
f4b177d
1
Parent(s):
f413cfe
Apply formatting for column names of numbers
Browse files
src/pages/50_League_Simulation.py
CHANGED
|
@@ -48,7 +48,7 @@ def get_sim_with_file_cache(league_key, schedule: pd.DataFrame, complete_weeks:
|
|
| 48 |
except Exception:
|
| 49 |
df = run_simulations(schedule, complete_weeks, n_sims, n_playoff)
|
| 50 |
df.to_parquet(file_name)
|
| 51 |
-
return
|
| 52 |
|
| 53 |
|
| 54 |
def get_page():
|
|
@@ -95,7 +95,7 @@ def get_page():
|
|
| 95 |
filtered_sims = sim_result.copy()
|
| 96 |
for week, filtered_match_dict in all_match_filters.items():
|
| 97 |
for match_index, match_winner in filtered_match_dict.items():
|
| 98 |
-
filtered_sims = filtered_sims[filtered_sims[
|
| 99 |
|
| 100 |
st.write(f"Number of Scenarios included in filter: {len(filtered_sims)} / {n_sims}")
|
| 101 |
st.dataframe(create_simulate_summary(filtered_sims))
|
|
|
|
| 48 |
except Exception:
|
| 49 |
df = run_simulations(schedule, complete_weeks, n_sims, n_playoff)
|
| 50 |
df.to_parquet(file_name)
|
| 51 |
+
return pd.read_parquet(file_name)
|
| 52 |
|
| 53 |
|
| 54 |
def get_page():
|
|
|
|
| 95 |
filtered_sims = sim_result.copy()
|
| 96 |
for week, filtered_match_dict in all_match_filters.items():
|
| 97 |
for match_index, match_winner in filtered_match_dict.items():
|
| 98 |
+
filtered_sims = filtered_sims[filtered_sims[str(float(week))][str(match_index)] == match_winner]
|
| 99 |
|
| 100 |
st.write(f"Number of Scenarios included in filter: {len(filtered_sims)} / {n_sims}")
|
| 101 |
st.dataframe(create_simulate_summary(filtered_sims))
|