I see that the pandas library has a Describe by
function which returns some useful statistics. However, is there a way to add additional rows to the output such as
The answer from piRSquared makes the most sense to me, but I get a deprecation warning about reindex_axis in Python 3.5. This works for me:
stats = data.describe()
stats.loc['IQR'] = stats.loc['75%'] - stats.loc['25%'] # appending interquartile range instead of recalculating it
stats = stats.append(data.reindex(stats.columns, axis=1).agg(['skew', 'mad', 'kurt']))