In order to divide to train test data :
X_train, X_test, y_train, y_test = train_test_split(X, y.iloc[:,1], test_size=0.3,random_state=seed, stratify=y)
but when I run I saw this error:(I have written the size of x and y)
Traceback (most recent call last): ... , in <module> X_train, X_test, y_train, y_test = train_test_split(X, y.iloc[:,1], test_size=0.3,random_state=seed, stratify=y) AttributeError: 'numpy.ndarray' object has no attribute 'iloc'
EDIT: The shapes are:
Shape(X)= (284807, 28)
Shape(y)= (284807,)
Then I used:
X_train, X_test, y_train, y_test = train_test_split(X, y[:,1], test_size=0.3,random_state=seed, stratify=y)
But I saw:
IndexError: too many indices for array
How to solve this problem?