Looking through the currently available document, the closest I was able to determine if this function can now be executed if you use the scipy.stats.pearsonr module.
r2 = stats.pearsonr("pct", "rdiff", df)
When trying to make it work directly in the Pandas framework, an error occurred due to a violation of the basic requirements for the input signal:
TypeError: pearsonr() takes exactly 2 arguments (3 given)
I managed to find another Pandas Seaborn user who obviously solved it: https://github.com/scipy/scipy/blob/v0.14.0/scipy/stats/stats.py#L2392
sns.regplot("rdiff", "pct", df, corr_func=stats.pearsonr);
But, unfortunately, I was not able to get this to work, because, apparently, the author created his own "corr_func", or there is an undocumented method for passing arguments Seaborn, available using a more manual method:
# x and y should have same length. x = np.asarray(x) y = np.asarray(y) n = len(x) mx = x.mean() my = y.mean() xm, ym = x-mx, y-my r_num = np.add.reduce(xm * ym) r_den = np.sqrt(ss(xm) * ss(ym)) r = r_num / r_den # Presumably, if abs(r) > 1, then it is only some small artifact of floating # point arithmetic. r = max(min(r, 1.0), -1.0) df = n-2 if abs(r) == 1.0: prob = 0.0 else: t_squared = r*r * (df / ((1.0 - r) * (1.0 + r))) prob = betai(0.5*df, 0.5, df / (df + t_squared)) return r, prob
We hope that this will help move this initial request towards an interim solution, since it really needs a utility to add regression statistics to the Seaborn package as a substitute for what can be easily obtained from MS-Excel or the Matplotlib line plan.