Answers for "how to replace ouliers with nan pandas"

8

pandas replace nan

data["Gender"].fillna("No Gender", inplace = True)
Posted by: Guest on April-15-2020
0

replace outliers with nan python

df.mask(df.sub(df.mean()).div(df.std()).abs().gt(2))

    c1   c2  c3 
0  NaN  1.0  2.0
1  1.0  3.0  4.0
2  2.0  5.0  6.0
3  3.0  1.0  NaN
4  4.0  3.0  4.0
5  5.0  5.0  6.0
6  6.0  NaN  6.0
Posted by: Guest on April-18-2020

Code answers related to "how to replace ouliers with nan pandas"

Python Answers by Framework

Browse Popular Code Answers by Language