diff --git a/src/gasflux/pre_processing.py b/src/gasflux/pre_processing.py index 1502748..abe35e9 100644 --- a/src/gasflux/pre_processing.py +++ b/src/gasflux/pre_processing.py @@ -129,7 +129,11 @@ def remove_outliers(df: pd.DataFrame, column: str, name: str): fence_low = q1 - 3 * iqr fence_high = q3 + 3 * iqr - fig = None # plotting disabled + try: + from . import plotting + fig = plotting.outliers(df, column, name) + except Exception: + fig = None outliers = df.loc[(df[column] < fence_low) | (df[column] > fence_high)] if len(outliers) > 0: