Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -479,20 +479,17 @@ 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 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
)
|
490 |
-
for j in range(len(x))
|
491 |
],
|
492 |
-
axis=
|
493 |
)
|
494 |
-
.
|
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
|
|
|
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 |
+
**{"background-color": "#E1EEDB"}, # Set col 1 with a green background
|
483 |
+
subset=pd.IndexSlice[:, 0], # Apply green to all rows of col 1
|
484 |
+
)
|
485 |
+
.apply(
|
486 |
+
lambda x: [
|
487 |
+
"background-color: white" if i % 2 == 0 else "background-color: rgb(237, 242, 251)" # Alternate white and blue rows
|
488 |
+
for i in range(len(x))
|
|
|
|
|
489 |
],
|
490 |
+
axis=0,
|
491 |
)
|
492 |
+
.hide(axis="index") # Hide the row index
|
|
|
493 |
) # Hide the row index
|
494 |
|
495 |
# Use _repr_html_() method to get the HTML representation of the styled DataFrame
|