def clean_data(df):
    """
    :param df: DataFrame of messages and categories
    :return: cleaned DataFrame of messages and categories, with duplicates removed
    """

    return df.drop_duplicates(subset='id')