Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,15 +55,15 @@ def variable_table(df):
|
|
| 55 |
|
| 56 |
# Add rows for each variable type with coloring
|
| 57 |
if categorical_vars:
|
| 58 |
-
|
| 59 |
if numerical_vars:
|
| 60 |
-
|
| 61 |
if text_vars:
|
| 62 |
-
|
| 63 |
|
| 64 |
# Handle cases where no variables are found
|
| 65 |
if not (categorical_vars or numerical_vars or text_vars):
|
| 66 |
-
|
| 67 |
|
| 68 |
html += "</table>"
|
| 69 |
return html
|
|
|
|
| 55 |
|
| 56 |
# Add rows for each variable type with coloring
|
| 57 |
if categorical_vars:
|
| 58 |
+
html += f"<tr style='background-color: {category_color};'><td>Categorical</td><td style='{data_style}'>{', '.join(categorical_vars)}</td></tr>"
|
| 59 |
if numerical_vars:
|
| 60 |
+
html += f"<tr style='background-color: {numerical_color};'><td>Numerical</td><td style='{data_style}'>{', '.join(numerical_vars)}</td></tr>"
|
| 61 |
if text_vars:
|
| 62 |
+
html += f"<tr style='background-color: {text_color};'><td>Text</td><td style='{data_style}'>{', '.join(text_vars)}</td></tr>"
|
| 63 |
|
| 64 |
# Handle cases where no variables are found
|
| 65 |
if not (categorical_vars or numerical_vars or text_vars):
|
| 66 |
+
html += "<tr><td>No variables found!</td></tr>"
|
| 67 |
|
| 68 |
html += "</table>"
|
| 69 |
return html
|