Does anyone know the explanation and the solution for this error as a result of trying to create train/split datasets using a Scikit-Learn method (train_test_split):
# list of feature names
feature_cols = ['date_time', 'bow', 'steel', 'swing', 'nail', 'peg']
# a subset of the original DataFrame
X = data[feature_cols]
# select a Series from the DataFrame
y = 'marks'
# split into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y,random_state=1)
Error:
ValueError: Found arrays with inconsistent numbers of samples: [ 3 7126674]