以下代碼作爲個人筆記(Python機器學習快速入門)
Talk is cheap,show me the code!
import pandas as pd
#1
fss='dat/iris.csv'
df=pd.read_csv(fss,index_col=False)
print(df.tail())
print(df.describe())
#2
d10=df['xname'].value_counts()
print(d10)
#1
print(df.describe())的輸出解釋如下。
count #數量
mean #均值
std #標準差
min #最小值
25% #下四分位
50% #中位數
75% #上四分位
max #最大值
#2
d10=df['xname'].value_counts()輸出類別,進行簡單的類別的統計,總共有三種,如下圖所示。
這是我收藏的資源,可以自行查看
我的博客資源:https://download.csdn.net/download/qq_40232872/10630602
百度網盤鏈接: https://pan.baidu.com/s/183xawVgcAvwd5tjYJBHJzQ 密碼: 6bg2