def get_monthly(
    df, net_erp_effect, group_by=("Duration_movement_date", "Visa_subclass")
    ):
    """
    Aggregate unit record NOM data to monthly by visa subclass
    """

    summary = (
        df[df.net_erp_effect == net_erp_effect]
        .groupby(group_by)
        .net_erp_effect.sum()
        .unstack()
    )

    return summary.resample("M").sum()