-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathExploratoryDataAnalysis.py
74 lines (37 loc) · 1.02 KB
/
ExploratoryDataAnalysis.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
#!/usr/bin/env python
# coding: utf-8
# In[188]:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# In[189]:
df = pd.read_csv("data/data without infertility _final.csv")
del df["Unnamed: 42"]
del df['Sl. No']
del df['Patient File No.']
null_columns=df.columns[df.isnull().any()]
df[null_columns].isnull().sum()
# In[190]:
# print(df[df.isnull().any(axis=1)][null_columns])
# In[191]:
df = df.dropna()
df.drop(df.index[305])
# print(max(df['AMH(ng/mL)']))
# In[192]:
# print(df[df.isnull().any(axis=1)][null_columns])
# In[199]:
# del df['AMH(ng/mL)']
l = df.columns.values
number_of_columns = 10
number_of_rows = len(l)-1/number_of_columns
plt.figure(figsize=(2*number_of_columns,10*number_of_rows))
for i in range(0,len(l)):
plt.subplot(number_of_rows + 1,number_of_columns,i+1)
sns.set_style('whitegrid')
sns.boxplot(df[l[i]],color='blue',orient='v')
plt.tight_layout()
# In[194]:
fig1, ax1 = plt.subplots()
ax1.set_title('Basic Plot')
ax1.boxplot(df)
# In[ ]: