/opt/conda/lib/python3.7/site-packages/ipykernel_launcher.py:8: FutureWarning: Automatic reindexing on DataFrame vs Series comparisons is deprecated and will raise ValueError in a future version. Do left, right = left.align(right, axis=1, copy=False) before e.g. left == right
I tried to remove outlier from my data frame using z-score manually by me
numerical_cols=df.select_dtypes(['int64','float64'])
for col in numerical_cols:
feature_value_less_than_3sigma=df[col].mean()-3*(df[col].std())
feature_value_greater_than_3sigma=df[col].mean()+3*(df[col].std())
df = df[~((df[col] < (feature_value_less_than_3sigma)) |(df[col] > (feature_value_greater_than_3sigma)))]
else:
print('\nAfter: ',df.shape)
I don't know what this error is telling and I like to know about it ,Can anyone explain with some simple example