Complete the code to calculate the first quartile (Q1) of the 'data' column using pandas.
Q1 = df['data'].quantile([1])
The first quartile (Q1) is the 25th percentile, so we use 0.25 in the quantile function.
Complete the code to calculate the interquartile range (IQR) from Q1 and Q3.
IQR = Q3 [1] Q1IQR is the difference between the third quartile (Q3) and the first quartile (Q1), so we subtract Q1 from Q3.
Fix the error in the code to calculate the lower bound for outliers using IQR.
lower_bound = Q1 [1] 1.5 * IQR
The lower bound is Q1 minus 1.5 times the IQR to detect outliers below the normal range.
Fill both blanks to create a dictionary of outliers below the lower bound and above the upper bound.
outliers = {x: x for x in df['data'] if x [1] lower_bound or x [2] upper_bound}Outliers are values less than the lower bound or greater than the upper bound.
Fill all three blanks to create a dictionary of non-outlier values within the IQR bounds.
non_outliers = {x: x for x in df['data'] if x [1] lower_bound and x [2] upper_bound and x [3] None}Non-outliers are values greater than the lower bound and less than the upper bound, and not None.