area444 commited on
Commit
708d3ee
·
verified ·
1 Parent(s): 90692b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -140,8 +140,8 @@ def update_table(start_date, end_date, window, user_text):
140
  #max_row_index = df['Prediction Revenue'].idxmax()
141
  #df = df.style.apply(lambda x: ['background-color: #d9f7be; color: black' if x.name == max_row_index else '' for i in x], axis=1)
142
  for i in range(len(df) - 1):
143
- if df.at[i, 'Prediction Revenue'] > df.at[i + 1, 'Prediction Revenue']:
144
- df.at[i, 'Prediction Revenue'] = df.at[i + 1, 'Prediction Revenue']
145
  df = df.style.apply(lambda x: ['background-color: #d9f7be; color: black' if x['Prediction Days Range'] == 'Prediction' else '' for i in range(len(x))], axis=1)
146
  #df_2 = df_payments.copy()
147
  return df#, df_2
 
140
  #max_row_index = df['Prediction Revenue'].idxmax()
141
  #df = df.style.apply(lambda x: ['background-color: #d9f7be; color: black' if x.name == max_row_index else '' for i in x], axis=1)
142
  for i in range(len(df) - 1):
143
+ if df.at[i, 'Prediction Revenue'] > df.at[i + 1, 'Prediction Revenue']:
144
+ df.at[i, 'Prediction Revenue'] = df.at[i + 1, 'Prediction Revenue']
145
  df = df.style.apply(lambda x: ['background-color: #d9f7be; color: black' if x['Prediction Days Range'] == 'Prediction' else '' for i in range(len(x))], axis=1)
146
  #df_2 = df_payments.copy()
147
  return df#, df_2