[8b8c33]: / sc code.py

Download this file

24 lines (24 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import pandas as pd
import matplotlib.pyplot as plt
data_patients = pd.read_csv("patient_data.csv")
print("\n the data frame is \n========================================")
print(data_patients)
maximum =data_patients.max()
print("\n the maxmum valuues in the data is \n========================================")
print(maximum)
minimum =data_patients.min()
print("\n the minmum valuues in the data is \n========================================")
print(minimum)
average_data_patients =data_patients["Glucose"].mean()
print("\n the average of Glucose is " , average_data_patients )
average_data_patients =data_patients["BloodPressure"].mean()
print("\n the average of BloodPressure is " , average_data_patients )
average_data_patients =data_patients["BMI"].mean()
print("\n the average of BMI is " , average_data_patients )
average_data_patients =data_patients["Age"].mean()
print("\n the average of Age is " , average_data_patients )
number_of_the_patients=data_patients[(data_patients['Age'] > 50) & (data_patients['BloodPressure'] >= 70)]
print("\n the number_of_the_patients is \n========================================")
print(number_of_the_patients)
data_patients.plot(kind='box', subplots=True, layout=(2,2), sharex=False, sharey=False)
plt.show()