import functools
import operator


def df_filter(df, filter_columns):
    """
    Filter the content of a dataframe.

    :param df: DataFrame to filter
    :type df: pandas.DataFrame

    :param filter_columns: Dict of `{"column": value)` that rows has to match
        to be selected.
    :type filter_columns: dict(str, object)
    """
    key = functools.reduce(
        operator.and_,
        (
            df[col] == val
            for col, val in filter_columns.items()
        )
    )

    return df[key]