Spaces:
Runtime error
Runtime error
Commit
·
c22dcd0
1
Parent(s):
f9309dc
Update app.py
Browse files
app.py
CHANGED
|
@@ -153,15 +153,15 @@ if uploaded_file is not None:
|
|
| 153 |
numerical_cols = df.select_dtypes(include=["float", "int"]).columns
|
| 154 |
categorical_cols = df.select_dtypes(include=["object"]).columns
|
| 155 |
|
| 156 |
-
|
| 157 |
-
|
| 158 |
|
| 159 |
-
if len(numerical_cols) >= 2:
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
elif len(categorical_cols) >= 2:
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
else:
|
| 166 |
-
|
| 167 |
-
|
|
|
|
| 153 |
numerical_cols = df.select_dtypes(include=["float", "int"]).columns
|
| 154 |
categorical_cols = df.select_dtypes(include=["object"]).columns
|
| 155 |
|
| 156 |
+
fig = px.treemap(df, path=categorical_cols)
|
| 157 |
+
st.plotly_chart(fig)
|
| 158 |
|
| 159 |
+
# if len(numerical_cols) >= 2:
|
| 160 |
+
# fig = px.scatter_matrix(df, dimensions=numerical_cols)
|
| 161 |
+
# st.plotly_chart(fig)
|
| 162 |
+
# elif len(categorical_cols) >= 2:
|
| 163 |
+
# fig = px.treemap(df, path=categorical_cols)
|
| 164 |
+
# st.plotly_chart(fig)
|
| 165 |
+
# else:
|
| 166 |
+
# fig = px.sunburst(df, path=categorical_cols + numerical_cols)
|
| 167 |
+
# st.plotly_chart(fig)
|