def convert_data_types(df):
    """
            Takes a pandas Dataframe (part of the black_friday_data_hack project) as input
            and convert the data types of some of its features.
            Arguments: data - DataFrame
            Returns: same DataFrame with converted data types
    """

    # Convert categorical features into numeric type
    df['Age'] = df['Age'].map({'0-17': 15, '18-25': 21, '26-35': 30, '36-45': 40, '46-50': 48, '51-55': 53, '55+': 55})
    df['Stay_In_Current_City_Years'] = df['Stay_In_Current_City_Years'].map({'0': 0, '1': 1, '2': 2, '3': 3, '4+': 4})

    # Convert numeric features into categorical type
    df['Occupation'] = df['Occupation'].astype('category')
    df['Product_Category_1'] = df['Product_Category_1'].astype('category')
    df['Product_Category_2'] = df['Product_Category_2'].astype('category')
    df['Product_Category_3'] = df['Product_Category_3'].astype('category')
    df['Marital_Status'] = df['Marital_Status'].astype('category')

    # Convert Product_ID to numerical type by discarding the 1st letter 'P'
    df['Product_ID'] = df['Product_ID'].map(lambda x: x[1:])
    df['Product_ID'] = df['Product_ID'].astype('int64')

    # Convert Purchase to numerical type
    df['Purchase'] = df['Purchase'].astype('int64')

    return df