AMKhakbaz commited on
Commit
5e088e3
·
verified ·
1 Parent(s): 049e688

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -491,7 +491,7 @@ def hierarchical_clustering_with_plotly(df, linkage_method):
491
  fig.update_layout(width=800, height=500)
492
  st.plotly_chart(fig)
493
 
494
- num_clusters = int(input("Enter the desired number of clusters: "))
495
 
496
  clusters = fcluster(Z, num_clusters, criterion='maxclust')
497
 
@@ -524,6 +524,9 @@ if uploaded_file:
524
  st.subheader("Displaying the first few rows of the DataFrame")
525
  st.dataframe(df.head())
526
 
 
 
 
527
  main_option = st.selectbox("Please select an option:", ["Tabulation", "Funnel Analysis", "Segmentation Analysis", "Hypothesis test", "Machine Learning", "Coding"])
528
 
529
  if main_option == "Tabulation":
@@ -532,9 +535,6 @@ if uploaded_file:
532
  tabulation_option = st.selectbox("Please select the type of analysis:", ["Univariate", "Multivariate", "All"])
533
 
534
  if tabulation_option == "All":
535
-
536
- cols = edit_strings(df.columns)
537
- cols = sorted(list(set(cols)))
538
 
539
  st.sidebar.header("Settings")
540
 
@@ -706,9 +706,6 @@ if uploaded_file:
706
 
707
  elif main_option == "Funnel Analysis":
708
  st.header("Funnel")
709
-
710
- cols = edit_strings(df.columns)
711
- cols = sorted(list(set(cols)))
712
 
713
  st.sidebar.header("Funnel Settings")
714
  single_list = st.sidebar.multiselect(
@@ -790,9 +787,6 @@ if uploaded_file:
790
 
791
  elif main_option == "Segmentation Analysis":
792
  st.header("Segmentation Analysis")
793
-
794
- cols = edit_strings(df.columns)
795
- cols = sorted(list(set(cols)))
796
 
797
  st.sidebar.header("Selection of questions")
798
  single_list = st.sidebar.multiselect(
 
491
  fig.update_layout(width=800, height=500)
492
  st.plotly_chart(fig)
493
 
494
+ num_clusters = int(st.text_input("Enter the desired number of clusters"))
495
 
496
  clusters = fcluster(Z, num_clusters, criterion='maxclust')
497
 
 
524
  st.subheader("Displaying the first few rows of the DataFrame")
525
  st.dataframe(df.head())
526
 
527
+ cols = edit_strings(df.columns)
528
+ cols = sorted(list(set(cols)))
529
+
530
  main_option = st.selectbox("Please select an option:", ["Tabulation", "Funnel Analysis", "Segmentation Analysis", "Hypothesis test", "Machine Learning", "Coding"])
531
 
532
  if main_option == "Tabulation":
 
535
  tabulation_option = st.selectbox("Please select the type of analysis:", ["Univariate", "Multivariate", "All"])
536
 
537
  if tabulation_option == "All":
 
 
 
538
 
539
  st.sidebar.header("Settings")
540
 
 
706
 
707
  elif main_option == "Funnel Analysis":
708
  st.header("Funnel")
 
 
 
709
 
710
  st.sidebar.header("Funnel Settings")
711
  single_list = st.sidebar.multiselect(
 
787
 
788
  elif main_option == "Segmentation Analysis":
789
  st.header("Segmentation Analysis")
 
 
 
790
 
791
  st.sidebar.header("Selection of questions")
792
  single_list = st.sidebar.multiselect(