我想實現機器學習與1059行4列的數據集,但試圖將與模型時,我收到以下錯誤: knn.fit(myData['RAB'], myData['ETAPE']) ValueError: Found input variables with inconsistent numbers of samples: [1, 1059] DeprecationWarning: Passing 1d arrays a
熊貓數據幀 | | col A |
|---|-------|
| 0 | A |
| 1 | B |
| 2 | C |
預期輸出的列(重新洗牌後) | | col A |
|---|-------|
| 0 | B |
| 1 | C |
| 2 | A |
如圖所示,我不希望改組(索引,值)整個對,但想要重新洗牌列中的值(colA中的重新洗牌值將具有新的索
我使用蟒蛇與Python 3.在Spyder的我運行下面的代碼 import pandas as pd
import quandl
import math
import numpy as np
from sklearn import preprocessing, cross_validation, svm
from sklearn.leanear_model import LearnRe