OatNapat commited on
Commit
747fbf3
·
1 Parent(s): f9ef0ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -60,21 +60,20 @@ if uploaded_files:
60
 
61
  selected_out = st.select("เลือก columns ที่จะดู Outlier", value=False)
62
  if selected_out:
63
- for col in selected_out:
64
- if col in df.columns:
65
- st.write(f"คอลัมน์ {col}:")
66
-
67
- # Calculate Z-Scores for the selected column
68
- z_scores = np.abs((df[col] - df[col].mean()) / df[col].std())
69
-
70
- # Set a threshold for identifying outliers (e.g., z_score > 3)
71
- threshold = 3
72
-
73
- # Identify outliers
74
- outliers = df[z_scores > threshold]
75
-
76
- st.write("Outliers:")
77
- st.write(outliers)
78
 
79
 
80
  st.markdown("Data transform")
 
60
 
61
  selected_out = st.select("เลือก columns ที่จะดู Outlier", value=False)
62
  if selected_out:
63
+ col = selected_out
64
+ st.write(f"คอลัมน์ {col}:")
65
+
66
+ # Calculate Z-Scores for the selected column
67
+ z_scores = np.abs((df[col] - df[col].mean()) / df[col].std())
68
+
69
+ # Set a threshold for identifying outliers (e.g., z_score > 3)
70
+ threshold = 3
71
+
72
+ # Identify outliers
73
+ outliers = df[z_scores > threshold]
74
+
75
+ st.write("Outliers:")
76
+ st.write(outliers)
 
77
 
78
 
79
  st.markdown("Data transform")