matplotlib: disregard outliers when plotting

There’s no single “best” test for an outlier. Ideally, you should incorporate a-priori information (e.g. “This parameter shouldn’t be over x because of blah…”). Most tests for outliers use the median absolute deviation, rather than the 95th percentile or some other variance-based measurement. Otherwise, the variance/stddev that is calculated will be heavily skewed by the … Read more

Detect and exclude outliers in a pandas DataFrame

If you have multiple columns in your dataframe and would like to remove all rows that have outliers in at least one column, the following expression would do that in one shot. df = pd.DataFrame(np.random.randn(100, 3)) import numpy as np from scipy import stats df[(np.abs(stats.zscore(df)) < 3).all(axis=1)] description: For each column, it first computes the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)