-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDATAvisual3.py
77 lines (32 loc) · 1.04 KB
/
DATAvisual3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
# In[2]:
import pandas as pd
# In[3]:
import matplotlib.pyplot as plt
# In[20]:
data_bank = pd.read_csv('bank.csv') # read the banl data using pandas
# In[5]:
data_bank.head(10)
# In[10]:
plt.bar(data_bank.Age,data_bank.Balance,color='red',label='age and Balance',)
plt.title('age vs Balance')
plt.xlabel("Age")
plt.ylabel('Balance')
# In[11]:
plt.scatter(data_bank.Age,data_bank.EstimatedSalary,color='red',label='Age and EstimatedSalary',)
plt.title('Age vs EstimatedSalary')
plt.xlabel("Age")
plt.ylabel('EstimatedSalary')
# In[13]:
data_bank.groupby('Geography').size().plot('pie',shadow=True, label='Geography',explode=[0.08,0,0] ,autopct='%d%%')
# In[15]:
plt.bar(data_bank.Geography,data_bank.Tenure,color='red',label='Geography and Gender',)
plt.title('Geography vs Gender')
plt.xlabel("Geography")
plt.ylabel('Gender')
# In[19]:
data_bank.groupby('Gender').size().plot('pie',shadow=True, label='Gender',explode=[0.08,0] ,autopct='%d%%')
# In[ ]: