我想实现机器学习与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