【发布时间】:2021-12-11 21:48:57
【问题描述】:
AttributeError at /turboai/turboAI/jaaiparameters/ enter image description here
def transform_data(df, cols, scaler, n_days_past=120): n_cols = len(cols) # df to np array np_arr = np.array(df.values.flatten().tolist()) np_arr = scaler.transform([np_arr]) np_arr = np_arr.reshape((np_arr.shape[0], n_days_past, n_cols)) return np_arr
【问题讨论】:
-
提供一些代码/数据来重现问题
-
您是否在任何地方初始化了
scaler对象?scaler = StandardScaler()
标签: python django numpy transform