السلام عليكم
ده الكود
statistical0 = diabetes.drop(['Outcome','DiabetesPedigreeFunction','Pregnancies'],axis=1).describe()
statistical1 = diabetes.drop(['Glucose' , 'BloodPressure' , 'SkinThickness' , 'Insulin','BMI' ,'Age'],axis=1).value_counts().describe()
plt.figure(figsize=(10,8))
statistical0.loc[['mean' , 'std' , 'min' , "25%" , "50%" , "75%", 'max']].transpose().plot(kind='bar',figsize=(12,8))
statistical1.loc(['mean' , 'std' , 'min' , '25%' , '50%' , '75%' , 'max']).transpose().plot(kind='bar' , figsize=(12,8))
plt.title("Statistical Summary of Diabetes Dataset")
plt.xlabel("Features")
plt.ylabel("Value")
plt.xticks(rotation=30)
plt.legend(["Mean" , "Std" , "Min" , "25%" , "50%" , "75%","Max"])
plt.grid(True)
plt.tight_layout()
plt.show()
ودي البيانات
diabetes_clean.csv