title: Rank with ties in python when tie breaker is random
body: <p>In R , way to break ties randomly when using the rank function is simple:</p>
  
  <pre><code>rank(my_vec, ties.method = "random")
  </code></pre>
  
  <p>However, though both scipy (<a href="https://docs.scipy.org/doc/scipy-0.16.0/reference/generated/scipy.stats.rankdata.html" rel="nofollow noreferrer">scipy.stats.rankdata</a>) and pandas (<a href="http://pandas.pydata.org/pandas-docs/version/0.17.0/generated/pandas.Series.rank.html" rel="nofollow noreferrer">pandas.Series.rank</a>) have ranking functions, none of them suggest a method that break ties randomly.
  Is there a simple way to use a framework in python that has this feature? Given that list order has to remain the same.</p>