James McCool commited on
Commit
178f6d2
·
1 Parent(s): 955ef0e

Refactor entry list retrieval in load_contest_file.py for improved clarity

Browse files

- Moved the retrieval and sorting of unique entry names to a more logical position within the load_contest_file function, enhancing code readability and maintainability.
- Maintained existing functionality while improving the organization of data processing steps during contest file loading.

Files changed (1) hide show
  1. global_func/load_contest_file.py +4 -4
global_func/load_contest_file.py CHANGED
@@ -134,10 +134,6 @@ def load_contest_file(upload, helper_var, helper = None, sport = None):
134
  st.table(cleaned_df.head(10))
135
 
136
  print('Made it through check_lineups')
137
-
138
- # Get unique entry names
139
- entry_list = list(set(df['BaseName']))
140
- entry_list.sort()
141
 
142
  st.table(entry_list)
143
  st.table(cleaned_df)
@@ -148,6 +144,10 @@ def load_contest_file(upload, helper_var, helper = None, sport = None):
148
  st.table(pos_df)
149
  st.table(check_lineups)
150
 
 
 
 
 
151
  if helper_var == 1:
152
  return cleaned_df, ownership_df, fpts_df, salary_df, team_df, pos_df, entry_list, check_lineups
153
  else:
 
134
  st.table(cleaned_df.head(10))
135
 
136
  print('Made it through check_lineups')
 
 
 
 
137
 
138
  st.table(entry_list)
139
  st.table(cleaned_df)
 
144
  st.table(pos_df)
145
  st.table(check_lineups)
146
 
147
+ # Get unique entry names
148
+ entry_list = list(set(df['BaseName']))
149
+ entry_list.sort()
150
+
151
  if helper_var == 1:
152
  return cleaned_df, ownership_df, fpts_df, salary_df, team_df, pos_df, entry_list, check_lineups
153
  else: