code: def print_MannWhitneyU(div_calc):
      
      try:
          x = div_calc.values()[0].values()
          y = div_calc.values()[1].values()
      except:
          return "Error setting up input arrays for Mann-Whitney U Test. Skipping "\
                 "significance testing."
      T, p = stats.mannwhitneyu(x, y)
      print "\nMann-Whitney U test statistic:", T
      print "Two-tailed p-value: {}".format(2 * p)
docs: Compute the Mann-Whitney U test for unequal group sample sizes.