美文网首页
python描述统计学算法

python描述统计学算法

作者: 云之行 | 来源:发表于2018-05-16 16:34 被阅读0次

numpy的数据处理方法

a =[98,83,65,72,79,76,75,94,91,77,63,83,89,69,64,78,63,86,91,72,71,72,70,80,65,70,62,74,71,76]

np.mean(a)#均值

np.mean(np.sort(a)[14:16])#中位数

np.var(a)#方差

np.std(a)#标准差

a = Series(a)

a.skew()#偏度

a.kurt()#峰度

a.describe()#描述数据的基本状况,还有分位数,分上四分位,下四分卫

describe运行情况

多元数据的数据特征

df = DataFrame({'data1': np.random.randn(5),'data2': np.random.randn(5)})

df.cov()#协方差

df.corr()#相关系数

相关文章

网友评论

      本文标题:python描述统计学算法

      本文链接:https://www.haomeiwen.com/subject/ibqpdftx.html