update table style
Browse files
web.py
CHANGED
@@ -106,7 +106,29 @@ data_filtering_table_data = pd.DataFrame(
|
|
106 |
],
|
107 |
}
|
108 |
)
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
table_div_filter_data = Div(NotStr(table_html_filter_data), style="margin: 40px;")
|
111 |
|
112 |
|
@@ -174,7 +196,29 @@ qf_filtering_table_data = pd.DataFrame(
|
|
174 |
],
|
175 |
}
|
176 |
)
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
table_div_qf_filter_data = Div(NotStr(table_html_qf_filter_data), style="margin: 40px;")
|
179 |
|
180 |
|
|
|
106 |
],
|
107 |
}
|
108 |
)
|
109 |
+
styled_table = (
|
110 |
+
dataset_comparison1.style.set_properties(
|
111 |
+
**{"background-color": "#E1EEDB"},
|
112 |
+
subset=pd.IndexSlice[0, :], # Row 0 with a light green background
|
113 |
+
)
|
114 |
+
.apply(
|
115 |
+
lambda x: [
|
116 |
+
"background-color: #E1EEDB"
|
117 |
+
if i == 0
|
118 |
+
else (
|
119 |
+
"background-color: rgb(237, 242, 251)"
|
120 |
+
if i % 2 == 0
|
121 |
+
else "background-color: white"
|
122 |
+
)
|
123 |
+
for i in range(len(x))
|
124 |
+
],
|
125 |
+
axis=0,
|
126 |
+
)
|
127 |
+
.hide(axis="index")
|
128 |
+
) # Hide the row index
|
129 |
+
|
130 |
+
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
131 |
+
table_html_filter_data = styled_table._repr_html_()
|
132 |
table_div_filter_data = Div(NotStr(table_html_filter_data), style="margin: 40px;")
|
133 |
|
134 |
|
|
|
196 |
],
|
197 |
}
|
198 |
)
|
199 |
+
styled_table = (
|
200 |
+
dataset_comparison1.style.set_properties(
|
201 |
+
**{"background-color": "#E1EEDB"},
|
202 |
+
subset=pd.IndexSlice[0, :], # Row 0 with a light green background
|
203 |
+
)
|
204 |
+
.apply(
|
205 |
+
lambda x: [
|
206 |
+
"background-color: #E1EEDB"
|
207 |
+
if i == 0
|
208 |
+
else (
|
209 |
+
"background-color: rgb(237, 242, 251)"
|
210 |
+
if i % 2 == 0
|
211 |
+
else "background-color: white"
|
212 |
+
)
|
213 |
+
for i in range(len(x))
|
214 |
+
],
|
215 |
+
axis=0,
|
216 |
+
)
|
217 |
+
.hide(axis="index")
|
218 |
+
) # Hide the row index
|
219 |
+
|
220 |
+
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
221 |
+
table_html_qf_filter_data = styled_table._repr_html_()
|
222 |
table_div_qf_filter_data = Div(NotStr(table_html_qf_filter_data), style="margin: 40px;")
|
223 |
|
224 |
|