Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
9f83d6b
1
Parent(s):
428f4e9
changed hold_file to over_file based on local ROO sequence
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import numpy as np
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
import streamlit as st
|
| 4 |
import gspread
|
|
@@ -169,29 +170,27 @@ with tab1:
|
|
| 169 |
salary_file = flex_file.copy()
|
| 170 |
|
| 171 |
overall_players = overall_file[['Player']]
|
| 172 |
-
|
| 173 |
for x in range(0,total_sims):
|
| 174 |
salary_file[x] = salary_file['Salary']
|
| 175 |
-
|
|
|
|
| 176 |
salary_file=salary_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 177 |
salary_file.astype('int').dtypes
|
| 178 |
-
|
| 179 |
salary_file = salary_file.div(1000)
|
| 180 |
-
|
| 181 |
-
for x in range(0,total_sims):
|
| 182 |
-
overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
|
| 183 |
-
|
| 184 |
overall_file=overall_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 185 |
overall_file.astype('int').dtypes
|
| 186 |
-
|
| 187 |
players_only = hold_file[['Player']]
|
| 188 |
raw_lineups_file = players_only
|
| 189 |
-
|
| 190 |
for x in range(0,total_sims):
|
| 191 |
-
maps_dict = {'proj_map':dict(zip(hold_file.Player,
|
| 192 |
raw_lineups_file[x] = sum([raw_lineups_file['Player'].map(maps_dict['proj_map'])])
|
| 193 |
players_only[x] = raw_lineups_file[x].rank(ascending=False)
|
| 194 |
-
|
| 195 |
players_only=players_only.drop(['Player'], axis=1)
|
| 196 |
players_only.astype('int').dtypes
|
| 197 |
|
|
@@ -256,29 +255,27 @@ with tab1:
|
|
| 256 |
salary_file = flex_file.copy()
|
| 257 |
|
| 258 |
overall_players = overall_file[['Player']]
|
| 259 |
-
|
| 260 |
for x in range(0,total_sims):
|
| 261 |
salary_file[x] = salary_file['Salary']
|
| 262 |
-
|
|
|
|
| 263 |
salary_file=salary_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 264 |
salary_file.astype('int').dtypes
|
| 265 |
-
|
| 266 |
salary_file = salary_file.div(1000)
|
| 267 |
-
|
| 268 |
-
for x in range(0,total_sims):
|
| 269 |
-
overall_file[x] = np.random.normal(overall_file['Median'],overall_file['STD'])
|
| 270 |
-
|
| 271 |
overall_file=overall_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 272 |
overall_file.astype('int').dtypes
|
| 273 |
-
|
| 274 |
players_only = hold_file[['Player']]
|
| 275 |
raw_lineups_file = players_only
|
| 276 |
-
|
| 277 |
for x in range(0,total_sims):
|
| 278 |
-
maps_dict = {'proj_map':dict(zip(hold_file.Player,
|
| 279 |
raw_lineups_file[x] = sum([raw_lineups_file['Player'].map(maps_dict['proj_map'])])
|
| 280 |
players_only[x] = raw_lineups_file[x].rank(ascending=False)
|
| 281 |
-
|
| 282 |
players_only=players_only.drop(['Player'], axis=1)
|
| 283 |
players_only.astype('int').dtypes
|
| 284 |
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
+
from numpy import random
|
| 3 |
import pandas as pd
|
| 4 |
import streamlit as st
|
| 5 |
import gspread
|
|
|
|
| 170 |
salary_file = flex_file.copy()
|
| 171 |
|
| 172 |
overall_players = overall_file[['Player']]
|
| 173 |
+
|
| 174 |
for x in range(0,total_sims):
|
| 175 |
salary_file[x] = salary_file['Salary']
|
| 176 |
+
overall_file[x] = random.normal(overall_file['Median'],overall_file['STD'])
|
| 177 |
+
|
| 178 |
salary_file=salary_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 179 |
salary_file.astype('int').dtypes
|
| 180 |
+
|
| 181 |
salary_file = salary_file.div(1000)
|
| 182 |
+
|
|
|
|
|
|
|
|
|
|
| 183 |
overall_file=overall_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 184 |
overall_file.astype('int').dtypes
|
| 185 |
+
|
| 186 |
players_only = hold_file[['Player']]
|
| 187 |
raw_lineups_file = players_only
|
| 188 |
+
|
| 189 |
for x in range(0,total_sims):
|
| 190 |
+
maps_dict = {'proj_map':dict(zip(hold_file.Player,overall_file[x]))}
|
| 191 |
raw_lineups_file[x] = sum([raw_lineups_file['Player'].map(maps_dict['proj_map'])])
|
| 192 |
players_only[x] = raw_lineups_file[x].rank(ascending=False)
|
| 193 |
+
|
| 194 |
players_only=players_only.drop(['Player'], axis=1)
|
| 195 |
players_only.astype('int').dtypes
|
| 196 |
|
|
|
|
| 255 |
salary_file = flex_file.copy()
|
| 256 |
|
| 257 |
overall_players = overall_file[['Player']]
|
| 258 |
+
|
| 259 |
for x in range(0,total_sims):
|
| 260 |
salary_file[x] = salary_file['Salary']
|
| 261 |
+
overall_file[x] = random.normal(overall_file['Median'],overall_file['STD'])
|
| 262 |
+
|
| 263 |
salary_file=salary_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 264 |
salary_file.astype('int').dtypes
|
| 265 |
+
|
| 266 |
salary_file = salary_file.div(1000)
|
| 267 |
+
|
|
|
|
|
|
|
|
|
|
| 268 |
overall_file=overall_file.drop(['Player', 'Position', 'Salary', 'Floor', 'Median', 'Ceiling', 'STD'], axis=1)
|
| 269 |
overall_file.astype('int').dtypes
|
| 270 |
+
|
| 271 |
players_only = hold_file[['Player']]
|
| 272 |
raw_lineups_file = players_only
|
| 273 |
+
|
| 274 |
for x in range(0,total_sims):
|
| 275 |
+
maps_dict = {'proj_map':dict(zip(hold_file.Player,overall_file[x]))}
|
| 276 |
raw_lineups_file[x] = sum([raw_lineups_file['Player'].map(maps_dict['proj_map'])])
|
| 277 |
players_only[x] = raw_lineups_file[x].rank(ascending=False)
|
| 278 |
+
|
| 279 |
players_only=players_only.drop(['Player'], axis=1)
|
| 280 |
players_only.astype('int').dtypes
|
| 281 |
|