Multichem commited on
Commit
8b29118
·
1 Parent(s): 56f1831

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1040,12 +1040,12 @@ with tab2:
1040
  # Drop unnecessary columns and create the final DataFrame
1041
  Overall_Proj = initial_proj[['Player', 'Team', 'Position', 'Median', 'Own', 'Salary']]
1042
 
1043
- if slate_var1 == 'Draftkings':
1044
  if insert_port == 1:
1045
  UserPortfolio = portfolio_dataframe[['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL']]
1046
  elif insert_port == 0:
1047
  UserPortfolio = pd.DataFrame(columns = ['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL'])
1048
- elif slate_var1 == 'Fanduel':
1049
  if insert_port == 1:
1050
  UserPortfolio = portfolio_dataframe[['C1', 'C2', 'W1', 'W2', 'D1', 'D2', 'UTIL1', 'UTIL2', 'G']]
1051
  elif insert_port == 0:
@@ -1112,9 +1112,9 @@ with tab2:
1112
  Raw_Portfolio = pd.DataFrame()
1113
 
1114
  # Loop through each position and split the data accordingly
1115
- if slate_var1 == 'Draftkings':
1116
  positions = ['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL']
1117
- elif slate_var1 == 'Fanduel':
1118
  positions = ['C1', 'C2', 'W1', 'W2', 'D1', 'D2', 'UTIL1', 'UTIL2', 'G']
1119
  for pos in positions:
1120
  temp_df = UserPortfolio[pos].str.split("(", n=1, expand=True)
@@ -1226,9 +1226,9 @@ with tab2:
1226
  st.session_state.Sim_Winner_Display = Sim_Winner_Frame.copy()
1227
 
1228
  # Conditional Replacement
1229
- if slate_var1 == 'Draftkings':
1230
  columns_to_replace = ['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL']
1231
- elif slate_var1 == 'Fanduel':
1232
  columns_to_replace = ['C1', 'C2', 'W1', 'W2', 'D1', 'D2', 'UTIL1', 'UTIL2', 'G']
1233
 
1234
  if site_var1 == 'Draftkings':
 
1040
  # Drop unnecessary columns and create the final DataFrame
1041
  Overall_Proj = initial_proj[['Player', 'Team', 'Position', 'Median', 'Own', 'Salary']]
1042
 
1043
+ if site_var1 == 'Draftkings':
1044
  if insert_port == 1:
1045
  UserPortfolio = portfolio_dataframe[['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL']]
1046
  elif insert_port == 0:
1047
  UserPortfolio = pd.DataFrame(columns = ['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL'])
1048
+ elif site_var1 == 'Fanduel':
1049
  if insert_port == 1:
1050
  UserPortfolio = portfolio_dataframe[['C1', 'C2', 'W1', 'W2', 'D1', 'D2', 'UTIL1', 'UTIL2', 'G']]
1051
  elif insert_port == 0:
 
1112
  Raw_Portfolio = pd.DataFrame()
1113
 
1114
  # Loop through each position and split the data accordingly
1115
+ if site_var1 == 'Draftkings':
1116
  positions = ['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL']
1117
+ elif site_var1 == 'Fanduel':
1118
  positions = ['C1', 'C2', 'W1', 'W2', 'D1', 'D2', 'UTIL1', 'UTIL2', 'G']
1119
  for pos in positions:
1120
  temp_df = UserPortfolio[pos].str.split("(", n=1, expand=True)
 
1226
  st.session_state.Sim_Winner_Display = Sim_Winner_Frame.copy()
1227
 
1228
  # Conditional Replacement
1229
+ if site_var1 == 'Draftkings':
1230
  columns_to_replace = ['C1', 'C2', 'W1', 'W2', 'W3', 'D1', 'D2', 'G', 'UTIL']
1231
+ elif site_var1 == 'Fanduel':
1232
  columns_to_replace = ['C1', 'C2', 'W1', 'W2', 'D1', 'D2', 'UTIL1', 'UTIL2', 'G']
1233
 
1234
  if site_var1 == 'Draftkings':