James McCool
commited on
Commit
·
a870eb6
1
Parent(s):
7df7a3b
removed prints
Browse files- global_func/exposure_spread.py +0 -11
- global_func/load_dk_fd_file.py +0 -5
- global_func/load_file.py +0 -3
- global_func/load_ss_file.py +0 -3
global_func/exposure_spread.py
CHANGED
@@ -220,10 +220,6 @@ def exposure_spread(working_frame, exposure_player, exposure_target, ignore_stac
|
|
220 |
random.shuffle(random_row_indices_insert)
|
221 |
random.shuffle(random_row_indices_replace)
|
222 |
|
223 |
-
print(player_exposure)
|
224 |
-
print(lineups_to_remove)
|
225 |
-
print(lineups_to_add)
|
226 |
-
|
227 |
# for each row to the the number of lineups to remove, replace with random choice from comparable player list if they can be inserted
|
228 |
|
229 |
# we will need to use two separate functions here, one for an exposure player who has a lineups to remove above 0 and one for below 0
|
@@ -267,8 +263,6 @@ def exposure_spread(working_frame, exposure_player, exposure_target, ignore_stac
|
|
267 |
except:
|
268 |
comparable_player_list = []
|
269 |
|
270 |
-
print(comparable_player_list)
|
271 |
-
print("^^^^ comparable player list")
|
272 |
if comparable_player_list:
|
273 |
insert_player = random.choice(comparable_player_list)
|
274 |
# Find which column contains the exposure_player
|
@@ -279,7 +273,6 @@ def exposure_spread(working_frame, exposure_player, exposure_target, ignore_stac
|
|
279 |
row_data = working_frame.iloc[row]
|
280 |
working_columns = working_frame.columns
|
281 |
|
282 |
-
print(working_columns)
|
283 |
for col in working_columns:
|
284 |
if row_data[col] == exposure_player:
|
285 |
# Get the replacement player's positions
|
@@ -329,10 +322,6 @@ def exposure_spread(working_frame, exposure_player, exposure_target, ignore_stac
|
|
329 |
|
330 |
# Create a list of comparable players
|
331 |
comparable_player_list = comparable_players['player_names'].tolist()
|
332 |
-
print(comp_salary_low)
|
333 |
-
print(comp_salary_high)
|
334 |
-
print(comparable_player_list)
|
335 |
-
print("^^^^ comparable player list")
|
336 |
if comparable_player_list:
|
337 |
# Find which column contains the exposure_player
|
338 |
if specific_columns != []:
|
|
|
220 |
random.shuffle(random_row_indices_insert)
|
221 |
random.shuffle(random_row_indices_replace)
|
222 |
|
|
|
|
|
|
|
|
|
223 |
# for each row to the the number of lineups to remove, replace with random choice from comparable player list if they can be inserted
|
224 |
|
225 |
# we will need to use two separate functions here, one for an exposure player who has a lineups to remove above 0 and one for below 0
|
|
|
263 |
except:
|
264 |
comparable_player_list = []
|
265 |
|
|
|
|
|
266 |
if comparable_player_list:
|
267 |
insert_player = random.choice(comparable_player_list)
|
268 |
# Find which column contains the exposure_player
|
|
|
273 |
row_data = working_frame.iloc[row]
|
274 |
working_columns = working_frame.columns
|
275 |
|
|
|
276 |
for col in working_columns:
|
277 |
if row_data[col] == exposure_player:
|
278 |
# Get the replacement player's positions
|
|
|
322 |
|
323 |
# Create a list of comparable players
|
324 |
comparable_player_list = comparable_players['player_names'].tolist()
|
|
|
|
|
|
|
|
|
325 |
if comparable_player_list:
|
326 |
# Find which column contains the exposure_player
|
327 |
if specific_columns != []:
|
global_func/load_dk_fd_file.py
CHANGED
@@ -90,9 +90,6 @@ def load_dk_fd_file(lineups, csv_file, site_var, type_var, sport_var):
|
|
90 |
# Now load and process the lineups file
|
91 |
try:
|
92 |
clean_name = re.sub(r' \(\d+\)', '', lineups.name)
|
93 |
-
|
94 |
-
print(clean_name)
|
95 |
-
print(lineups.name)
|
96 |
|
97 |
if clean_name.endswith('.csv'):
|
98 |
lineups_df = pd.read_csv(lineups)
|
@@ -101,8 +98,6 @@ def load_dk_fd_file(lineups, csv_file, site_var, type_var, sport_var):
|
|
101 |
else:
|
102 |
st.error('Please upload either a CSV or Excel file for lineups')
|
103 |
return None, None
|
104 |
-
|
105 |
-
print(lineups_df)
|
106 |
|
107 |
try:
|
108 |
lineups_df = lineups_df.drop(columns=['Entry ID', 'Contest Name', 'Contest ID', 'Entry Fee'])
|
|
|
90 |
# Now load and process the lineups file
|
91 |
try:
|
92 |
clean_name = re.sub(r' \(\d+\)', '', lineups.name)
|
|
|
|
|
|
|
93 |
|
94 |
if clean_name.endswith('.csv'):
|
95 |
lineups_df = pd.read_csv(lineups)
|
|
|
98 |
else:
|
99 |
st.error('Please upload either a CSV or Excel file for lineups')
|
100 |
return None, None
|
|
|
|
|
101 |
|
102 |
try:
|
103 |
lineups_df = lineups_df.drop(columns=['Entry ID', 'Contest Name', 'Contest ID', 'Entry Fee'])
|
global_func/load_file.py
CHANGED
@@ -87,9 +87,6 @@ def load_file(upload, site_var, type_var, sport_var, upload_type):
|
|
87 |
if upload is not None:
|
88 |
try:
|
89 |
clean_name = re.sub(r' \(\d+\)', '', upload.name)
|
90 |
-
|
91 |
-
print(clean_name)
|
92 |
-
print(upload.name)
|
93 |
|
94 |
if clean_name.endswith('.csv'):
|
95 |
df = pd.read_csv(upload)
|
|
|
87 |
if upload is not None:
|
88 |
try:
|
89 |
clean_name = re.sub(r' \(\d+\)', '', upload.name)
|
|
|
|
|
|
|
90 |
|
91 |
if clean_name.endswith('.csv'):
|
92 |
df = pd.read_csv(upload)
|
global_func/load_ss_file.py
CHANGED
@@ -90,9 +90,6 @@ def load_ss_file(lineups, csv_file, site_var, type_var, sport_var):
|
|
90 |
# Now load and process the lineups file
|
91 |
try:
|
92 |
clean_name = re.sub(r' \(\d+\)', '', lineups.name)
|
93 |
-
|
94 |
-
print(clean_name)
|
95 |
-
print(lineups.name)
|
96 |
|
97 |
if clean_name.endswith('.csv'):
|
98 |
lineups_df = pd.read_csv(lineups)
|
|
|
90 |
# Now load and process the lineups file
|
91 |
try:
|
92 |
clean_name = re.sub(r' \(\d+\)', '', lineups.name)
|
|
|
|
|
|
|
93 |
|
94 |
if clean_name.endswith('.csv'):
|
95 |
lineups_df = pd.read_csv(lineups)
|