如何將pandas的dataframe切割成機器學習訓練時所需要的train set和test set?

Yanwei Liu
May 8, 2021

--

參考資料

#假設讀者已經透過pandas載入csv或json檔案並保存成df變數:from sklearn.model_selection import train_test_split
train, test = train_test_split(df, test_size=0.2)

--

--

No responses yet