nlpblogs commited on
Commit
20792b0
·
verified ·
1 Parent(s): a446794

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -98,6 +98,11 @@ if upload_file is not None:
98
  new_columns = [f'column_{i+1}' for i in range(len(df.columns))]
99
  df.columns = new_columns
100
  st.dataframe(df, key="csv_dataframe")
 
 
 
 
 
101
 
102
 
103
  st.write("_number of rows_", df.shape[0])
 
98
  new_columns = [f'column_{i+1}' for i in range(len(df.columns))]
99
  df.columns = new_columns
100
  st.dataframe(df, key="csv_dataframe")
101
+ fig = px.treemap(df, path=[px.Constant("all"), 'column_1', 'column_2'],
102
+ values='column_1', color='column_2')
103
+ fig.update_layout(margin = dict(t=50, l=25, r=25, b=25))
104
+ st.subheader("Tree map", divider = "red")
105
+ st.plotly_chart(fig)
106
 
107
 
108
  st.write("_number of rows_", df.shape[0])