Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #drop #rows #extreme #values #single #column
ADD COMMENT
Topic
Name
6+1 =