Gowthamvemula commited on
Commit
db2c596
·
verified ·
1 Parent(s): fb4f1be

Update pages/3_EDA_and_Feature_Engineering.py

Browse files
pages/3_EDA_and_Feature_Engineering.py CHANGED
@@ -129,26 +129,28 @@ if df is not None:
129
  st.pyplot(fig)
130
  st.markdown('''**Insights:**
131
  **Right-skewed distribution:** Most clients have low balances, while a few have very high balances.
 
132
  **Segmentation potential:** Clients can be segmented based on balance levels (low, medium, high).
 
133
  **Marketing and product implications:** Tailor marketing and products to each segment.
 
134
  **Risk management:** High-balance clients may pose higher risk.
135
  ''')
136
 
137
- # Product Price Binning
138
- # Plot the pie chart for the 'gender' columnplt.figure(figsize=(8, 8))
139
- df['Gender'].value_counts().plot(kind='pie', autopct='%1.1f%%', startangle=90, colors=['skyblue', 'yellow'])
140
-
141
- # Add title
 
 
 
142
  plt.title('Gender Distribution')
143
-
144
- # Display the chart
145
  plt.tight_layout()
146
  plt.show()
147
  st.markdown('''**Insights:**
148
- - **Uneven Distribution**: The distribution is not even across price buckets, indicating certain price ranges are more common.
149
- - **"Very High" Dominance**: The "Very High" bucket contains the most products, indicating a focus on premium items.
150
- - **Lower Representation in "Very Low"**: The "Very Low" bucket has the fewest items, suggesting fewer budget-friendly products.
151
- - **Balanced Mid-Range**: The "Low", "Medium", and "High" buckets have relatively similar counts.
152
  ''')
153
 
154
  # Age Distribution and Binning
 
129
  st.pyplot(fig)
130
  st.markdown('''**Insights:**
131
  **Right-skewed distribution:** Most clients have low balances, while a few have very high balances.
132
+
133
  **Segmentation potential:** Clients can be segmented based on balance levels (low, medium, high).
134
+
135
  **Marketing and product implications:** Tailor marketing and products to each segment.
136
+
137
  **Risk management:** High-balance clients may pose higher risk.
138
  ''')
139
 
140
+ # Generate pie chart
141
+ df['Gender'].value_counts().plot(
142
+ kind='pie',
143
+ autopct='%1.1f%%',
144
+ startangle=90,
145
+ colors=['skyblue', 'yellow']
146
+ )
147
+ # Add title
148
  plt.title('Gender Distribution')
149
+ # Adjust layout and display the chart
 
150
  plt.tight_layout()
151
  plt.show()
152
  st.markdown('''**Insights:**
153
+
 
 
 
154
  ''')
155
 
156
  # Age Distribution and Binning