将[samples,timesteps]重塑为[samples,timesteps,features]

2024-06-02 07:32:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我想重塑定义为的数据

X_train, y_train = series.iloc[:70, :n_steps], series.iloc[:70, -1]

[samples, timesteps, features] 但我得到了以下错误:

AttributeError: 'DataFrame' object has no attribute 'reshape'


Tags: 数据dataframe定义object错误trainstepsseries