一醉鳖、基本統(tǒng)計特征函數(shù)
統(tǒng)計特征函數(shù)用于計算數(shù)據(jù)的均值、方差秉继、標準差祈噪、分位數(shù)、相關(guān)系數(shù)和協(xié)方差等尚辑。
pandas主要統(tǒng)計特征函數(shù)
二辑鲤、拓展統(tǒng)計特征函數(shù)
image.png
image.png
(7)繪制條形圖 bar
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
index = np.arange(4)
sales_BJ=[52,55,63,53]
sales_SH=[44,66,55,41]
bar_width=0.3
plt.bar(index,sales_BJ,bar_width,color='b') #sales_BJ直方圖
plt.bar(index+bar_width,sales_SH,bar_width,color='r') #疊加sales_SH的直方圖(主要是加一個bar_width)圖1
#plt.bar(index,sales_SH,bar_width,color='r',bottom=sales_BJ) #疊加sales_SH的層疊圖 圖2
plt.show()