Guided Project: Exploring Ebay Car Sales Data [Removing outliers from price]

Continuing the discussion from Guided Project: Exploring Ebay Car Sales Data [Removing outliers from price and odometer columns]:

autos[autos['price'].between(100,500000)]

I used the code above to remove outliers with the assumption that price for a used car should not be less than $100 or more than $500000. The code ran well but I just want to be sure that I am on the right part. And it did not update the original autos dataset. Do I need to assign it?

Hi @dazzletrail,

If you want to remove the out-range values from your dataset, you have to assign it back to the dataset:

autos = autos[autos['price'].between(100,500000)]

Otherwise, you’ll just visualize the corresponding rows, without removing anything.