代码:
df['Miles'] = preprocessing.normalize(df['Miles'])
错误信息:
ValueError: Expected 2D array, got 1D array instead:
array=[33.3304678 33.3304678 33.3304678 ... 3.00959404 3.00959404
3.00959404].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.