Spaces:
Running
Running
James McCool
commited on
Commit
•
615c09a
1
Parent(s):
cfd334c
idk man making a player stats copy
Browse files
app.py
CHANGED
@@ -423,6 +423,7 @@ with tab5:
|
|
423 |
sim_vars = ['Points', 'Rebounds', 'Assists', 'Points + Assists + Rebounds', 'Points + Assists', 'Points + Rebounds', 'Assists + Rebounds']
|
424 |
for prop in sim_vars:
|
425 |
prop_df = prop_df_raw.loc[prop_df_raw['prop_type'] == prop]
|
|
|
426 |
|
427 |
for books in book_selections:
|
428 |
prop_df = prop_df.loc[prop_df['book'] == books]
|
@@ -432,12 +433,19 @@ with tab5:
|
|
432 |
prop_df['Under'] = 1 / prop_df['under_line']
|
433 |
|
434 |
prop_dict = dict(zip(prop_df.Player, prop_df.Prop))
|
|
|
435 |
book_dict = dict(zip(prop_df.Player, prop_df.book))
|
436 |
over_dict = dict(zip(prop_df.Player, prop_df.Over))
|
437 |
under_dict = dict(zip(prop_df.Player, prop_df.Under))
|
438 |
|
439 |
-
|
440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
team_dict = dict(zip(df.Player, df.Team))
|
442 |
|
443 |
total_sims = 1000
|
|
|
423 |
sim_vars = ['Points', 'Rebounds', 'Assists', 'Points + Assists + Rebounds', 'Points + Assists', 'Points + Rebounds', 'Assists + Rebounds']
|
424 |
for prop in sim_vars:
|
425 |
prop_df = prop_df_raw.loc[prop_df_raw['prop_type'] == prop]
|
426 |
+
player_df = player_stats.copy()
|
427 |
|
428 |
for books in book_selections:
|
429 |
prop_df = prop_df.loc[prop_df['book'] == books]
|
|
|
433 |
prop_df['Under'] = 1 / prop_df['under_line']
|
434 |
|
435 |
prop_dict = dict(zip(prop_df.Player, prop_df.Prop))
|
436 |
+
prop_type_dict = dict(zip(prop_df.Player, prop_df.prop_type))
|
437 |
book_dict = dict(zip(prop_df.Player, prop_df.book))
|
438 |
over_dict = dict(zip(prop_df.Player, prop_df.Over))
|
439 |
under_dict = dict(zip(prop_df.Player, prop_df.Under))
|
440 |
|
441 |
+
player_df['book'] = player_df['Player'].map(book_dict)
|
442 |
+
player_df['Prop'] = player_df['Player'].map(prop_dict)
|
443 |
+
player_df['prop_type'] = player_df['Player'].map(prop_type_dict)
|
444 |
+
|
445 |
+
df = player_df.reset_index(drop=True)
|
446 |
+
|
447 |
+
st.table(df)
|
448 |
+
|
449 |
team_dict = dict(zip(df.Player, df.Team))
|
450 |
|
451 |
total_sims = 1000
|