def select_features(keep_cols, df_train, df_test=None):
    """Keep selected cols in dataframes

    Parameters
    ----------
    keep_cols : List
        List of columns to keep
    df_train : pd.DataFrame
        Training Dataframe containing all features
    df_test : pd.DataFrame
        Test Dataframe containing all features

    Returns
    -------
    Pandas Dataframe
        Dataframe containing train dataset
    Pandas Dataframe
        Dataframe containing test dataset
    """

    df_train_copy = df_train[keep_cols].copy()
    if df_test is not None:
        df_test_copy = df_test[keep_cols].copy()
    else:
        df_test_copy = None

    return df_train_copy, df_test_copy