def _get_most_common_field_value_for_group(df, groupby, fld):
    """Helper to get most frequent value for one field of a groupby"""
    cts = df.groupby([groupby, fld]).size().to_frame('n_rows')
    pairs = cts.sort_values('n_rows', ascending=False).reset_index(
        ).drop_duplicates([groupby], keep='first')
    ser = pairs.set_index(groupby)[[fld]]
    return ser
