Medical Data Visualiser: cleaning the data for the heat map

I just needed a detailed explanation for how and why the df_heat clean-up looks this way:

df_heat = df[
      (df['ap_lo'] <= df['ap_hi'])
      & (df['height'] >= df['height'].quantile(0.025))
      & (df['height'] <= df['height'].quantile(0.975))
      & (df['weight'] >= df['weight'].quantile(0.025))
      & (df['weight'] <= df['weight'].quantile(0.975))

Thanks in advance:)

Medical Data Visualizer
Link to the challenge:

The user stories tell you to remove the height/weight values that are at or below the 2.5 percentile and at or above the 97.5 percentile.

Sorry I couldn’t reply earlier but thanks.