Gowthamvemula commited on
Commit
4dfea30
·
verified ·
1 Parent(s): fece586

Update pages/3_EDA_and_Feature_Engineering.py

Browse files
pages/3_EDA_and_Feature_Engineering.py CHANGED
@@ -258,14 +258,23 @@ if 'cleaned_data' in st.session_state:
258
  - The bar chart clearly shows the difference in customer numbers across countries.
259
  - The pie chart visually represents the percentage distribution of customers.
260
  ''')
261
- # countplot for Gender distribution
262
- plt.figure(figsize=(8, 6))
263
- sns.countplot(data=df, x='exiting_category', color='#A52A2A')
264
- plt.title('Distribution Of Exiting Category')
265
- plt.xlabel('Exiting_Category')
266
- plt.ylabel('Count')
 
 
 
 
 
 
 
267
  plt.tight_layout()
268
- plt.show()
 
 
269
  st.markdown('''
270
  **Insights Distribution Of Exiting Category**
271
  1. **Category Breakdown**:
 
258
  - The bar chart clearly shows the difference in customer numbers across countries.
259
  - The pie chart visually represents the percentage distribution of customers.
260
  ''')
261
+ st.write("### Distribution of Exiting Category")
262
+
263
+ # Create the figure
264
+ fig, ax = plt.subplots(figsize=(8, 6))
265
+
266
+ # Create the countplot
267
+ sns.countplot(data=df, x='exiting_category', color='#A52A2A', ax=ax)
268
+
269
+ # Add title and labels
270
+ ax.set_title('Distribution Of Exiting Category')
271
+ ax.set_xlabel('Exiting Category')
272
+ ax.set_ylabel('Count')
273
+
274
  plt.tight_layout()
275
+
276
+ # Display the plot in Streamlit
277
+ st.pyplot(fig)
278
  st.markdown('''
279
  **Insights Distribution Of Exiting Category**
280
  1. **Category Breakdown**: