from sklearn.model_selection import train_test_split
predictors=data.drop(['target'],axis=1)
targets=data['target']
train_x,test_x,train_y,test_y=train_test_split(predictors,targets,test_size=0.2,random_state=0)
shape of train_x
is (242,13)
shape of train_y
is (242,)
shape of test_x
is (61,13)
shape of test_y
is (61,)
dataset has 303 examples and i/p has 13 features
if I try
np.reshape(train_y,(-1,1))
It says data must be 1 dimensional
I want train_y shape to be (242,1)