Median of pandas dataframe column
If you're looking for how to calculate the Median Absolute Deviation -
In [1]: df['dist'] = abs(df['count'] - df['count'].median())
In [2]: df
Out[2]:
name count dist
0 aaaa 2000 1100
1 bbbb 1900 1000
2 cccc 900 0
3 dddd 500 400
4 eeee 100 800
In [3]: df['dist'].median()
Out[3]: 800.0
If you want to see the median, you can use df.describe(). The 50% value is the median.