I have CSV data with shapes (6042, 6) like this and call it using DataFrame:

[![enter image description here](https://i.stack.imgur.com/pjkgz.png)](https://i.stack.imgur.com/pjkgz.png)

I want to use it for input on LSTM.
From what I read, LSTM requires data in the form of a 3d array `[samples, time steps, features]`.
Because the DataFrame doesn't have a reshape attribute, I changed it to a NumPy array and tried to reshape it, but get the error:

```
TypeError: only integer scalar arrays can be converted to a scalar index

```

I tried using the following code:

```
train_data = train_data.to_numpy()
train_data = train_data.reshape(1, train_data[0], train_data[1])

```

Is my step wrong?