Q: sklearn.model_selection.train_test_split for rows, not columns I have a DataFrame 32*5:

I want select rows from 1 to 31 as X(independent values) and row 32 as Y(dependent value).
X_train, X_test, Y_train, Y_test = train_test_split(dff3.iloc[1:32, 1:6].values, dff3.iloc[-1, 1:6].values, test_size = 0.25)

but I think it select columns as X, and compare columns, not rows.
and shows Error: Found input variables with inconsistent numbers of samples.
how can I define rows as X?
thanks
