Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -137,8 +137,9 @@ def update_table(start_date, end_date, window, user_text):
|
|
137 |
global df # Use global variable
|
138 |
#global df_2
|
139 |
df = df_predictions.copy()
|
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 |
#df_2 = df_payments.copy()
|
143 |
return df#, df_2
|
144 |
|
|
|
137 |
global df # Use global variable
|
138 |
#global df_2
|
139 |
df = df_predictions.copy()
|
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 |
+
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)
|
143 |
#df_2 = df_payments.copy()
|
144 |
return df#, df_2
|
145 |
|