text_plain_output_1.png image_output_1.png
from sklearn.cross_validation import train_test_split

print('Training_Shape:', train.shape)
ids = test['id']
test = test.drop(['id'], axis=1)
y = train['Demanda_uni_equil']
X = train[test.columns.values]
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1729)
print('Division_Set_Shapes:', X.shape, y.shape)
print('Validation_Set_Shapes:', X_train.shape, X_test.shape)