Python Rank Method Dense