12 2022 档案
摘要:plt.hist()的参数density=True时候,纵轴是概率密度而不是概率(特别的:当bins的大小=1的时候,概率密度=概率。用这个方法就可以给整数型随机变量画出概率统计图了)。 plt.hist()的参数density=False时候,纵轴是频次。当bins的大小=1时,可以给整数型随机变
阅读全文
摘要:import pandas as pd x = np.random.randn(1000) data = pd.Series(x) # 将数据由数组转换成series形式 plt.hist(data,density = True,edgecolor ='w',label = '直方图') data.
阅读全文
摘要:f = plt.figure(figsize=(19, 15)) plt.matshow(df.corr(), fignum=f.number) plt.xticks(range(df.shape[1]), df.columns, fontsize=14, rotation=45) plt.ytic
阅读全文