ValueError: Expected 2D array, got 1D array instead问题 解决办法: 对于python3版本经常会出现该问题, scaler.fit(df['Age']) 改为: scaler.fit(df['Age'].values.reshape(-1,1))