In the next exercise i tried this code
rainfall = np.array([5.21, 3.76, 3.27, 2.35, 1.89, 1.55, 0.65, 1.06, 1.72, 3.35, 4.82, 5.11]) rain_mean = np.mean(rainfall) rain_median = np.median(rainfall) first_quarter = np.quantile(rainfall,0.25) first_quarterr = np.percentile(rainfall,25) print(first_quarter) print(first_quarterr)
But here don’t know why it gave this error
Traceback (most recent call last): File "script.py", line 9, in <module> first_quarter = np.quantile(rainfall,0.25) AttributeError: 'module' object has no attribute 'quantile'
I knew there’s no point of error here so tried in Jupyter Notebook and it runs successfully