I was doing a study case for my assignment on World Aid and how we as programmers should handle the problem. So I was running this code which cuts out the outliers.
percentiles = data_help['exports'].quantile([0.05,0.95]).values
data_help['exports'][data_help['exports'] <= percentiles[0]] = percentiles[0]
data_help['exports'][data_help['exports'] >= percentiles[1]] = percentiles[1]
When I run this code it returns the error as
A value is trying to be set on a copy of a slice from a DataFrame
I did not encounter this problem when I was using my friends computer.