def f():
    if query!=None:
        return filtered_columns.groupby(input_columns_names.tolist()).size() / len(column_values.index)
    else:
        return column_values.groupby(input_columns_names.tolist()).size()/len(column_values.index)