def get_query_features_df(df_samples, queries):
    """Apply queries on df_samples and return a boolean feature dataframe.

    If X = df_bool.values, then X[i, j] is True iff condition j is true for sample i
    """
    df_bool = df_samples[[]].copy()
    for query in queries:
        try:
            df_bool[query] = df_samples.eval(query)
        except Exception as e:
            print(query, e)
            raise
    return df_bool