pydata/pandas — pull request #6886 by nspies (2014-04-15 16:24:16+00:00)
Title: Series.rank() doesn't handle small floats correctly

Okay, this fixes #6868 but does so with a bit of a performance penalty. The current pandas version performs just a tad slower than `scipy.stats.rankdata()`, but after these changes, it's about 2-3x slower. On the plus side, it does (what I think is) the right thing.

I'm no cython expert, so there may well be things that can be done to improve the speed.

Here's some quick benchmarking code (couldn't figure out how to work with the vbench suite):

```
import timeit
setup2 = """import pandas
import scipy.stats
import numpy
numpy.random.seed(154)
s = pandas.Series(numpy.random.normal(size=10000))"""

print "pandas:", timeit.repeat(stmt='s.rank()', setup=setup2, repeat=3, number=10000)
print "scipy:", timeit.repeat(stmt='scipy.stats.rankdata(s)',
setup=setup2, repeat=3, number=10000)
```