stats
MultiComparison.
getranks
convert data to rankdata and attach
This creates rankdata as it is used for non-parametric tests, where in the case of ties the average rank is assigned.
statsmodels.sandbox.stats.multicomp.MultiComparison.allpairtest
statsmodels.sandbox.stats.multicomp.MultiComparison.kruskal