Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#split dataset into features and target variable
feature_cols = list(df.columns)[2:]
X = df[feature_cols] # Features
y = df[['language']] # Target variable
# Split dataset into training set and test set
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) # 80% train and 20% test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment