def clean_job(data, jobtitle=['Data Analyst', 'Data Scientist', 'Junior',
                              'Stage', 'Business Analyst', 'Data Engineer',
                              'Ingénieur Data', 'Alternance', 'Développeur']):

    """
    Create a new column with job title clean and ready to use by a ML model

    Parameter:
        jobtitle: list of job (ex: jobtitle = ['Data Analyst', 'Data Scientist'
        , 'Junior', 'Stage', 'Business Analyst', 'Data Engineer',
        'Ingénieur Data', 'Alternance', 'Développeur'])
        data : dataframe with a Title column to process

    Returns:
        data : a dataframe with a new clean column title
    """    
    rownan = []
    data['CleanJob'] = ""  # Create new column

    for i, dirtytitle in enumerate(data['Title']):

        dirtytitle = dirtytitle.lower()  # in lower case for comparaison

        for clean_title in jobtitle:
            clean_title = clean_title.lower()

            if clean_title in dirtytitle:
                # add all key title in CleanJob column
                data['CleanJob'][i] += clean_title + " "
            else:
                pass
            
        if data['CleanJob'][i] == "":
            rownan.append(dirtytitle)
            data['CleanJob'][i] = data['Job_Category'][i].lower()

    return data