Python 中的异常检测
Bekhruz (Bex) Tuychiev
Kaggle Master, Data Science Content Creator
进行两次分析:包含与不包含离群点。
# Calculate the percentiles percentile_first = google['Volume'].quantile(0.01) percentile_99th = google['Volume'].quantile(0.99)# Trim google['Volume'] = google['Volume'].clip(percentile_first, percentile_99th)
google.replace(0, 100, inplace=True)
Python 中的异常检测