Efficient method to calculate the rank vector of a list in Python

后端 未结 11 964
温柔的废话
温柔的废话 2020-12-02 20:06

I\'m looking for an efficient way to calculate the rank vector of a list in Python, similar to R\'s rank function. In a simple list with no ties between the ele

11条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 20:58

    There is a really nice module called Ranking http://pythonhosted.org/ranking/ with an easy to follow instruction page. To download, simply use easy_install ranking

提交回复
热议问题