機器學習案例的小問題,AttributeError: 'Series' object has no attribute 'reshape'的解決

這裏出現了AttributeError: ‘Series’ object has no attribute 'reshape’的報錯,這是因爲軟件版本升級導致的,只需要將代碼改爲data[‘normAmount’] = StandardScaler().fit_transform(data[‘Amount’].values.reshape(-1, 1))即可解決問題。
相關文章
相關標籤/搜索