數據的集中趨勢主要包含均值(一般均值、截尾均值、縮尾均值、幾何平均數、調和平均數)、中位數、分位數、衆數。
這裏嘗試用可視化方法取得以上數值。
除了部分輸入對話框需要鍵盤輸入數值,其餘都用鼠標完成。
部分運算結果:
df_cars.dist 衆數:
ModeResult(mode=array([26], dtype=int64), count=array([4]))
df_cars.dist 幾何平均數:
34.326147962734844
df_cars.dist 調和平均數:
22.182142726578665
df_cars.dist 中位數:
36.0
df_cars.dist位於分位點 [10,20,25,50,75,100] 的分位數:
[ 15.8 21.6 26. 36. 56. 120. ]
數值:55 在 df_cars.dist 中的分位點:
72.0