Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -479,23 +479,20 @@ new_dataset_comparison1 = pd.DataFrame(
|
|
479 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
480 |
styled_table = (
|
481 |
new_dataset_comparison1.style.set_properties(
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
.apply(
|
486 |
-
lambda x: [
|
487 |
-
"background-color: #E1EEDB"
|
488 |
-
if i == 0
|
489 |
else (
|
490 |
-
"background-color: rgb(237, 242, 251)"
|
491 |
-
if
|
492 |
-
else "background-color: white"
|
493 |
)
|
494 |
-
for
|
495 |
],
|
496 |
-
axis=
|
497 |
)
|
498 |
-
.
|
|
|
499 |
) # Hide the row index
|
500 |
|
501 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|
|
|
479 |
# Apply table styling: Light green for the header, alternating white and light grey for rows
|
480 |
styled_table = (
|
481 |
new_dataset_comparison1.style.set_properties(
|
482 |
+
lambda x: [
|
483 |
+
"background-color: #E1EEDB" # Green background for column 1
|
484 |
+
if i == 1
|
|
|
|
|
|
|
|
|
485 |
else (
|
486 |
+
"background-color: rgb(237, 242, 251)" # Blue for even rows
|
487 |
+
if j % 2 == 0
|
488 |
+
else "background-color: white" # White for odd rows
|
489 |
)
|
490 |
+
for j in range(len(x))
|
491 |
],
|
492 |
+
axis=1,
|
493 |
)
|
494 |
+
.set_properties(**{"background-color": "#E1EEDB"}, subset=pd.IndexSlice[:, 1]) # Column 1 green background
|
495 |
+
.hide(axis="index") # Hide row index
|
496 |
) # Hide the row index
|
497 |
|
498 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|