1、statistics.mean() #求算术平均值
>>> import statistics
>>> date = [1,2,98,99]
>>> statistics.mean(date)
50
2、statistics.median() #计算数据的中位数,如果有两个中位数,则返回其平均值
>>> import statistics
>>> date = [11,12,13,14,15,16]
>>> statistics.median(date)
13.5
statistics.median_low() #数据中的低中位数
>>> import statistics
>>> date = [11,12,13,14,15,16]
>>> statistics.median_low(date)
13
statistics.median_high() #数据中的高中位数
>>> import statistics
>>> date = [11,12,13,14,15,16]
>>> statistics.median_high(date)
14
3、statistics.mode() #计算众数
>>> import statistics
>>> date = [1,2,2,3,3,3]
>>> statistics.mode(date)
3
4、statistics.pvariance() #计算数据的总体方差
>>> import statistics
>>> date = [11,12,13,14,15,16]
>>> statistics.pvariance(date)
2.9166666666666665