def filter_by_year(df, filter_cat="conc_yy", year=1990):
    """Filter df by year, either with conception year ('conc_yy')
    or birth year ('dob_yy')
    """
    df = (
        df[df[filter_cat] == year]
        .groupby(
            [
                "conc_yy",
                "conc_month",
                "dob_yy",
                "birth_month",
                "conc_mm",
                "dob_mm",
            ],
            as_index=False,
        )
        .sum()
    )
    if filter_cat == "conc_yy":
        df = df.sort_values(by=["conc_mm"]).reset_index(drop=True)
        return df
    else:
        df = df.sort_values(by=["dob_mm"]).reset_index(drop=True)
        return df