Answers for "pandas how to drop rows with extreme values in a single column"

0

pandas how to drop rows with extreme values in a single column

standard_deviations = 3
new_df = df[((df['col'] - df['col'].mean()) / df['col'].std()).abs() < standard_deviations]
Posted by: Guest on February-25-2022

Code answers related to "pandas how to drop rows with extreme values in a single column"

Python Answers by Framework

Browse Popular Code Answers by Language