Spaces:
Sleeping
Sleeping
DandyGoesti21
commited on
Commit
•
a0dbcc0
1
Parent(s):
93da1b5
Upload EDA_M2_dandy.py
Browse files- EDA_M2_dandy.py +6 -3
EDA_M2_dandy.py
CHANGED
@@ -105,14 +105,14 @@ def run():
|
|
105 |
From the chart, it can be seen that 20.4% or 2037 people will churn or leave, while 79.6% or 7963 people will not churn or not leave.
|
106 |
''')
|
107 |
|
108 |
-
st.subheader('
|
109 |
# Calculate country counts
|
110 |
country_counts = df['country'].value_counts(normalize=True)
|
111 |
labels = country_counts.index
|
112 |
sizes = country_counts.values
|
113 |
|
114 |
# Create a pie chart with specified figsize
|
115 |
-
fig, ax = plt.subplots(figsize=(
|
116 |
ax.pie(sizes, labels=labels, autopct='%.1f%%', startangle=90)
|
117 |
ax.set_title('Countries')
|
118 |
ax.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
|
@@ -120,7 +120,7 @@ def run():
|
|
120 |
# Display the pie chart using Streamlit
|
121 |
st.pyplot(fig)
|
122 |
st.write('''
|
123 |
-
|
124 |
''')
|
125 |
|
126 |
# create straight line
|
@@ -181,6 +181,9 @@ def run():
|
|
181 |
st.write('''
|
182 |
There is no significant correlation between variable to target.
|
183 |
''')
|
|
|
|
|
|
|
184 |
|
185 |
if __name__ == '__main__':
|
186 |
run()
|
|
|
105 |
From the chart, it can be seen that 20.4% or 2037 people will churn or leave, while 79.6% or 7963 people will not churn or not leave.
|
106 |
''')
|
107 |
|
108 |
+
st.subheader('Country Distribution')
|
109 |
# Calculate country counts
|
110 |
country_counts = df['country'].value_counts(normalize=True)
|
111 |
labels = country_counts.index
|
112 |
sizes = country_counts.values
|
113 |
|
114 |
# Create a pie chart with specified figsize
|
115 |
+
fig, ax = plt.subplots(figsize=(20, 8))
|
116 |
ax.pie(sizes, labels=labels, autopct='%.1f%%', startangle=90)
|
117 |
ax.set_title('Countries')
|
118 |
ax.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
|
|
|
120 |
# Display the pie chart using Streamlit
|
121 |
st.pyplot(fig)
|
122 |
st.write('''
|
123 |
+
From the Pie chart it can be seen that France dominates the data with 50.1% followed by Germany with 25.1 and Spain 24.8%.
|
124 |
''')
|
125 |
|
126 |
# create straight line
|
|
|
181 |
st.write('''
|
182 |
There is no significant correlation between variable to target.
|
183 |
''')
|
184 |
+
'''
|
185 |
+
There is no significant correlation between variable to target.
|
186 |
+
'''
|
187 |
|
188 |
if __name__ == '__main__':
|
189 |
run()
|