ceckenrode commited on
Commit
720933c
1 Parent(s): 287667a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -1,12 +1,10 @@
1
-
2
  import streamlit as st
3
  import pandas as pd
4
  import plotly.express as px
5
- import cx_Oracle as ora
6
- import pandas as pd
7
- from pandas_profiling import ProfileReport
8
 
9
- st.title("File Upload and Profiling")
 
 
10
 
11
  # Upload a CSV dataset
12
  uploaded_file = st.file_uploader("Upload your dataset", type=["csv"])
@@ -18,13 +16,13 @@ if uploaded_file is not None:
18
  # Generate a treemap or sunburst plot based on data types
19
  numerical_cols = df.select_dtypes(include=["float", "int"]).columns
20
  categorical_cols = df.select_dtypes(include=["object"]).columns
21
-
22
  if len(numerical_cols) >= 2:
23
  fig = px.scatter_matrix(df, dimensions=numerical_cols)
24
  st.plotly_chart(fig)
25
  elif len(categorical_cols) >= 2:
26
- fig = px.treemap(df, path=['CD_CDNG_C', 'RECORDCOUNTUNIQUEASSESSMENTLOINC'])
27
  st.plotly_chart(fig)
28
  else:
29
- fig = px.sunburst(df, path=['CD_CDNG_C', 'RECORDCOUNTUNIQUEASSESSMENTLOINC'])
30
- st.plotly_chart(fig)
 
 
1
  import streamlit as st
2
  import pandas as pd
3
  import plotly.express as px
 
 
 
4
 
5
+ st.set_page_config(page_title="AutoML Streamlit App", page_icon=":robot:", layout="wide")
6
+
7
+ st.title("AutoML Streamlit App")
8
 
9
  # Upload a CSV dataset
10
  uploaded_file = st.file_uploader("Upload your dataset", type=["csv"])
 
16
  # Generate a treemap or sunburst plot based on data types
17
  numerical_cols = df.select_dtypes(include=["float", "int"]).columns
18
  categorical_cols = df.select_dtypes(include=["object"]).columns
19
+
20
  if len(numerical_cols) >= 2:
21
  fig = px.scatter_matrix(df, dimensions=numerical_cols)
22
  st.plotly_chart(fig)
23
  elif len(categorical_cols) >= 2:
24
+ fig = px.treemap(df, path=categorical_cols)
25
  st.plotly_chart(fig)
26
  else:
27
+ fig = px.sunburst(df, path=categorical_cols + numerical_cols)
28
+ st.plotly_chart(fig)