Multichem commited on
Commit
ffb8ec5
1 Parent(s): a76d311

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +82 -82
app.py CHANGED
@@ -155,89 +155,89 @@ with col2:
155
 
156
  comb_DF = comb_DF.sort_values(by='Proj', ascending=False)
157
 
158
- cut_var = 0
159
-
160
- if stack_size == 3:
161
- while cut_var <= int(len(comb_DF)):
162
- try:
163
- if int(cut_var) == 0:
164
- cur_proj = float(comb_DF.iat[cut_var,4])
165
- cur_own = float(comb_DF.iat[cut_var,8])
166
- elif int(cut_var) >= 1:
167
- check_own = float(comb_DF.iat[cut_var,8])
168
- if check_own < cur_own:
169
- comb_DF = comb_DF.drop([cut_var])
170
- cur_own = cur_own
171
- cut_var = cut_var - 1
172
- comb_DF = comb_DF.reset_index()
173
- comb_DF = comb_DF.drop(['index'], axis=1)
174
- elif check_own >= cur_own:
175
- cur_own = float(comb_DF.iat[cut_var,8])
176
- cut_var = cut_var
177
- cut_var += 1
178
- except:
179
- cut_var += 1
180
 
181
- elif stack_size == 4:
182
- while cut_var <= int(len(comb_DF)):
183
- try:
184
- if int(cut_var) == 0:
185
- cur_proj = float(comb_DF.iat[cut_var,5])
186
- cur_own = float(comb_DF.iat[cut_var,10])
187
- elif int(cut_var) >= 1:
188
- check_own = float(comb_DF.iat[cut_var,10])
189
- if check_own < cur_own:
190
- comb_DF = comb_DF.drop([cut_var])
191
- cur_own = cur_own
192
- cut_var = cut_var - 1
193
- comb_DF = comb_DF.reset_index()
194
- comb_DF = comb_DF.drop(['index'], axis=1)
195
- elif check_own >= cur_own:
196
- cur_own = float(comb_DF.iat[cut_var,10])
197
- cut_var = cut_var
198
- cut_var += 1
199
- except:
200
- cut_var += 1
201
- elif stack_size == 5:
202
- while cut_var <= int(len(comb_DF)):
203
- try:
204
- if int(cut_var) == 0:
205
- cur_proj = float(comb_DF.iat[cut_var,6])
206
- cur_own = float(comb_DF.iat[cut_var,12])
207
- elif int(cut_var) >= 1:
208
- check_own = float(comb_DF.iat[cut_var,12])
209
- if check_own < cur_own:
210
- comb_DF = comb_DF.drop([cut_var])
211
- cur_own = cur_own
212
- cut_var = cut_var - 1
213
- comb_DF = comb_DF.reset_index()
214
- comb_DF = comb_DF.drop(['index'], axis=1)
215
- elif check_own >= cur_own:
216
- cur_own = float(comb_DF.iat[cut_var,12])
217
- cut_var = cut_var
218
- cut_var += 1
219
- except:
220
- cut_var += 1
221
- elif stack_size == 6:
222
- while cut_var <= int(len(comb_DF)):
223
- try:
224
- if int(cut_var) == 0:
225
- cur_proj = float(comb_DF.iat[cut_var,7])
226
- cur_own = float(comb_DF.iat[cut_var,14])
227
- elif int(cut_var) >= 1:
228
- check_own = float(comb_DF.iat[cut_var,14])
229
- if check_own < cur_own:
230
- comb_DF = comb_DF.drop([cut_var])
231
- cur_own = cur_own
232
- cut_var = cut_var - 1
233
- comb_DF = comb_DF.reset_index()
234
- comb_DF = comb_DF.drop(['index'], axis=1)
235
- elif check_own >= cur_own:
236
- cur_own = float(comb_DF.iat[cut_var,14])
237
- cut_var = cut_var
238
- cut_var += 1
239
- except:
240
- cut_var += 1
241
 
242
  with stack_hold_container:
243
  stack_hold_container = st.empty()
 
155
 
156
  comb_DF = comb_DF.sort_values(by='Proj', ascending=False)
157
 
158
+ # cut_var = 0
159
+
160
+ # if stack_size == 3:
161
+ # while cut_var <= int(len(comb_DF)):
162
+ # try:
163
+ # if int(cut_var) == 0:
164
+ # cur_proj = float(comb_DF.iat[cut_var,4])
165
+ # cur_own = float(comb_DF.iat[cut_var,8])
166
+ # elif int(cut_var) >= 1:
167
+ # check_own = float(comb_DF.iat[cut_var,8])
168
+ # if check_own < cur_own:
169
+ # comb_DF = comb_DF.drop([cut_var])
170
+ # cur_own = cur_own
171
+ # cut_var = cut_var - 1
172
+ # comb_DF = comb_DF.reset_index()
173
+ # comb_DF = comb_DF.drop(['index'], axis=1)
174
+ # elif check_own >= cur_own:
175
+ # cur_own = float(comb_DF.iat[cut_var,8])
176
+ # cut_var = cut_var
177
+ # cut_var += 1
178
+ # except:
179
+ # cut_var += 1
180
 
181
+ # elif stack_size == 4:
182
+ # while cut_var <= int(len(comb_DF)):
183
+ # try:
184
+ # if int(cut_var) == 0:
185
+ # cur_proj = float(comb_DF.iat[cut_var,5])
186
+ # cur_own = float(comb_DF.iat[cut_var,10])
187
+ # elif int(cut_var) >= 1:
188
+ # check_own = float(comb_DF.iat[cut_var,10])
189
+ # if check_own < cur_own:
190
+ # comb_DF = comb_DF.drop([cut_var])
191
+ # cur_own = cur_own
192
+ # cut_var = cut_var - 1
193
+ # comb_DF = comb_DF.reset_index()
194
+ # comb_DF = comb_DF.drop(['index'], axis=1)
195
+ # elif check_own >= cur_own:
196
+ # cur_own = float(comb_DF.iat[cut_var,10])
197
+ # cut_var = cut_var
198
+ # cut_var += 1
199
+ # except:
200
+ # cut_var += 1
201
+ # elif stack_size == 5:
202
+ # while cut_var <= int(len(comb_DF)):
203
+ # try:
204
+ # if int(cut_var) == 0:
205
+ # cur_proj = float(comb_DF.iat[cut_var,6])
206
+ # cur_own = float(comb_DF.iat[cut_var,12])
207
+ # elif int(cut_var) >= 1:
208
+ # check_own = float(comb_DF.iat[cut_var,12])
209
+ # if check_own < cur_own:
210
+ # comb_DF = comb_DF.drop([cut_var])
211
+ # cur_own = cur_own
212
+ # cut_var = cut_var - 1
213
+ # comb_DF = comb_DF.reset_index()
214
+ # comb_DF = comb_DF.drop(['index'], axis=1)
215
+ # elif check_own >= cur_own:
216
+ # cur_own = float(comb_DF.iat[cut_var,12])
217
+ # cut_var = cut_var
218
+ # cut_var += 1
219
+ # except:
220
+ # cut_var += 1
221
+ # elif stack_size == 6:
222
+ # while cut_var <= int(len(comb_DF)):
223
+ # try:
224
+ # if int(cut_var) == 0:
225
+ # cur_proj = float(comb_DF.iat[cut_var,7])
226
+ # cur_own = float(comb_DF.iat[cut_var,14])
227
+ # elif int(cut_var) >= 1:
228
+ # check_own = float(comb_DF.iat[cut_var,14])
229
+ # if check_own < cur_own:
230
+ # comb_DF = comb_DF.drop([cut_var])
231
+ # cur_own = cur_own
232
+ # cut_var = cut_var - 1
233
+ # comb_DF = comb_DF.reset_index()
234
+ # comb_DF = comb_DF.drop(['index'], axis=1)
235
+ # elif check_own >= cur_own:
236
+ # cur_own = float(comb_DF.iat[cut_var,14])
237
+ # cut_var = cut_var
238
+ # cut_var += 1
239
+ # except:
240
+ # cut_var += 1
241
 
242
  with stack_hold_container:
243
  stack_hold_container = st.empty()