Then you could do
```
Y = Y[:, -1].reshape((-1, 1))
```