Using the modified z-score 0.6745 × (x − median) / MAD on minutes (MAD = median of absolute distances from the median), store the order_id values with an absolute score above 3.5 in result (a list).
import pandas as pd
deliveries = pd.DataFrame({
"order_id": list(range(501, 521)),
"zone": ["North", "South"] * 10,
"minutes": [28, 31, 25, 35, 30, 27, 33, 29, 26, 140, 32, 30, 24, 38, 29, 31, 95, 28, 27, 34],
})Store your final answer in a variable named result.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.