def clean_data(df):
    """Cleans data by removing duplicates and possible glitches from the original data set.
    """

    # drop duplicates
    df.drop_duplicates(subset=None, keep="first", inplace=True)

    # # drop rows where related = 2 (probably a glitch)
    df = df[df["related"] != 2]

    # drop "child_alone" category, there are no samples that fit this one
    df.drop("child_alone", axis=1, inplace=True)

    return df