def _impute_missing_values(transcript_group):
    """Impute the missing values

    Args:
        transcript_group (pandas.DataFrame): The transcript dataset

    Returns:
        pandas.DataFrame: The modified transcript with the missing values imputed
    """

    transcript_group.amount = transcript_group.amount.fillna(0)
    transcript_group.reward = transcript_group.reward.fillna(0)
    transcript_group.non_offer_amount = transcript_group.non_offer_amount.fillna(0)
    transcript_group.mapped_offer = transcript_group.mapped_offer.fillna(0).astype(int)
    transcript_group.difficulty = transcript_group.difficulty.fillna(0)
    transcript_group.duration = transcript_group.duration.fillna(0)
    transcript_group.web = transcript_group.web.fillna(0).astype(bool)
    transcript_group.email = transcript_group.email.fillna(0).astype(bool)
    transcript_group.mobile = transcript_group.mobile.fillna(0).astype(bool)
    transcript_group.social = transcript_group.social.fillna(0).astype(bool)
    transcript_group.gender = transcript_group.gender.fillna("U")
    transcript_group.offer_type = transcript_group.offer_type.fillna("no_offer")

    diffs_mean = transcript_group.diffs.mean()
    transcript_group.diffs = transcript_group.diffs.fillna(diffs_mean)

    return transcript_group