How do you find the IQR in Numpy?

前端 未结 3 563
夕颜
夕颜 2020-12-08 08:56

Is there a baked-in Numpy/Scipy function to find the interquartile range? I can do it pretty easily myself, but mean() exists which is basically sum/len<

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 09:44

    There is now an iqr function in scipy.stats. It is available as of scipy 0.18.0. My original intent was to add it to numpy, but it was considered too domain-specific.

    You may be better off just using Jaime's answer, since the scipy code is just an over-complicated version of the same.

提交回复
热议问题