I have a DataFrame df :
name count aaaa 2000 bbbb 1900 cccc 900 dddd 500 eeee 100
I would like to see rows that are within 10 times of the median of the count column.
I tried df['count'].median() and got the median. But I donβt know how to move on. Can you suggest how I could use pandas / numpy for this.
Expected Result:
name count distance from median aaaa 2000 *****
I can use any measure as the distance from the median (absolute deviation from the median, quantile, etc.).
Ssank source share