pandas 你好,世界
示例
一旦安装了Pandas,您可以通过创建随机分布值的数据集并绘制其直方图来检查其是否正常工作。
import pandas as pd # This is always assumed but is included here as an introduction. import numpy as np importmatplotlib.pyplotas plt np.random.seed(0) values = np.random.randn(100) # array of normally distributed random numbers s = pd.Series(values) # generate a pandas series s.plot(kind='hist', title='Normally distributed random values') # hist computes distribution plt.show()
检查一些数据的统计信息(均值,标准差等)
s.describe() # Output: count 100.000000 # mean 0.059808 # std 1.012960 # min -2.552990 # 25% -0.643857 # 50% 0.094096 # 75% 0.737077 # max 2.269755 # dtype: float64
热门推荐
10 新婚祝福语简短十六字
11 恩师退休花束祝福语简短
12 经典祝福语简短情侣句子
13 哥哥新婚祝福语创意简短
14 对别人新年祝福语简短
15 新年送老师简短祝福语
16 鱼的内涵简短祝福语
17 新年祝福语大全简短老师
18 生日祝福语简短搞笑女儿