For this Question: Find the average effectiveness of each advertising channel in the period from 2017 to 2018 (both included). The efficiency is calculated as the ratio of money spent to total customers acquired. 
Output the advertising channel along with corresponding average effectiveness. 
Sort records by the average effectiveness in ascending order.DataFrame/SQL Table with the following schema -
<schema>[{'name': 'uber_advertising', 'columns': [{'name': 'year', 'type': 'int64'}, {'name': 'advertising_channel', 'type': 'object'}, {'name': 'money_spent', 'type': 'int64'}, {'name': 'customers_acquired', 'type': 'int64'}]}]</schema>Each row in a new line and each value of a row separated by a |, i.e.
0|1|2
1|2|3
2|3|4-, I have written this Solution Code: # DataFrame already loaded with name <strong>uber_advertising<strong>
import numpy as np
mask1 = uber_advertising['year'] == 2017
mask2 = uber_advertising['year'] == 2018
df = uber_advertising[mask1 | mask2]
df['eff'] = df['money_spent']/df['customers_acquired']
df= df.groupby(by= ['advertising_channel'],as_index = False).sum()
df['eff'] = df['money_spent']/df['customers_acquired']
df['eff'] = df['eff'].apply(np.floor).astype('int32')
df = df.sort_values(by= ['eff'])
for i, r in df.iterrows():
    print(f"{r['advertising_channel']}|{r['eff']}"), In this Programming Language: Python, Now tell me if this Code is compilable or not?