def get_train_validate(full_df, features, split):
    """Generate training and validation sets with features."""
    X = full_df[features + ['demand']]
    print('[dtypes of features (including demand):]')
    print(X.dtypes.value_counts())

    print('\nSplit train and validation sets on day', split)
    X_train = X[X['day'] <= split]
    X_val = X[X['day'] > split]

    y_train = X_train.pop('demand')
    y_val = X_val.pop('demand')

    days_train = len(X_train['day'].unique())
    days_val = len(X_val['day'].unique())
    print('')
    print(days_train, 'days in train set.')
    print('X_train:', X_train.shape)
    print('y_train:', y_train.shape)
    print('')
    print(days_val, 'days in validation set.')
    print('X_val:', X_val.shape)
    print('y_val:', y_val.shape)

    return X_train, X_val, y_train, y_val