I had calculated the percentage of outliers in my dataset using the IQR method and I got the next result:
I want to remove outliers for Wind Speed and Pressure using z1 score is that possible?
I got my data set from the next site: my data and I used the next function to calculate the outliers percentage:
def outlier_percent(data):
Q1 = data.quantile(0.25)
Q3 = data.quantile(0.75)
IQR = Q3 - Q1
minimum = Q1 - (1.5 * IQR)
maximum = Q3 + (1.5 * IQR)
num_outliers = np.sum((data < minimum) |(data > maximum))
num_total = data.count()
return (num_outliers/num_total)*100