抽样分布的验证
import pandas as pd
import numpy as np
df=pd.read_excel(r'/Users/huangqiankun/Downloads/data.xlsx')
embark=data.groupby(['Embarked'])
embark_basic = df.groupby(['Embarked']).agg(['count','min','max','median','mean','var','std'])
age_basic = embark_basic['Age']
fare_basic = embark_basic['Fare']
验证正态分布
import seaborn as sns
sns.set_palette("hls") #设置所有图的颜色,使用hls色彩空间
sns.distplot(data['Age'],color="r",bins=10,kde=True)
plt.title('Age')
plt.xlim(-10,80)
plt.grid(True)
plt.show()