1. Learn
  2. /
  3. Courses
  4. /
  5. Exploratory Data Analysis in Python

Connected

Exercise

Removing outliers

While removing outliers isn't always the way to go, for your analysis, you've decided that you will only include flights where the "Price" is not an outlier.

Therefore, you need to find the upper threshold and then use it to remove values above this from the planes DataFrame.

pandas has been imported for you as pd, along with seaborn as sns.

Instructions 1/4

undefined XP
  • 1
    • Find the 75th and 25th percentiles, saving as price_seventy_fifth and price_twenty_fifth respectively.
  • 2
    • Calculate the IQR, storing it as prices_iqr.
  • 3
    • Calculate the upper and lower outlier thresholds.
  • 4
    • Remove the outliers from planes.