Sasidhar commited on
Commit
a0d26a9
1 Parent(s): 39f55b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -144,17 +144,20 @@ def create_component_for_analysis_for_single_df(selected_files, dfs, i):
144
  st.write(df_for_analysis.sample(10))
145
  elif action == 'Get Profile':
146
 
147
- col_subset = st.multiselect("Select subset of columns", df.columns.values,key='filter_subset_'+ str(i))
148
 
149
- if not col_subset:
150
  st.warning("This might take a lot of time to generate the report depending on the size of the data.Select a subset of columns")
151
  confirm_full_run = st.button("Run on full data")
152
  if confirm_full_run:
153
  pr = df_for_analysis.profile_report()
 
154
  else:
155
- pr = df_for_analysis[col_subset]
156
-
157
- st_profile_report(pr)
 
 
158
 
159
  elif action == 'Summary of Data':
160
  st.write(df_for_analysis.describe())
 
144
  st.write(df_for_analysis.sample(10))
145
  elif action == 'Get Profile':
146
 
147
+ full_data_check = st.checkbox("Report on all columns",key="filter_data_check"+str(i))
148
 
149
+ if full_data_check:
150
  st.warning("This might take a lot of time to generate the report depending on the size of the data.Select a subset of columns")
151
  confirm_full_run = st.button("Run on full data")
152
  if confirm_full_run:
153
  pr = df_for_analysis.profile_report()
154
+ st_profile_report(pr)
155
  else:
156
+ col_subset = st.multiselect("Select subset of columns", df.columns.values,key='filter_subset_'+ str(i))
157
+
158
+ if col_subset:
159
+ pr = df_for_analysis[col_subset]
160
+ st_profile_report(pr)
161
 
162
  elif action == 'Summary of Data':
163
  st.write(df_for_analysis.describe())