Skip to content

Commit 1fcb94e

Browse files
Tobias Brandttobias-aam
Tobias Brandt
authored andcommitted
ENH: Marked rolling_corr_pairwise and expanding_corr_pairwise as deprecated.
1 parent 27442b1 commit 1fcb94e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/stats/moments.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,14 @@ def _flex_binary_moment(arg1, arg2, f, pairwise=False):
291291
return _flex_binary_moment(arg2, arg1, f)
292292

293293

294-
@Substitution("Pairwise moving sample correlation", _pairwise_arg,
294+
@Substitution("Deprecated. Use rolling_corr(..., pairwise=True) instead.\n\n"
295+
"Pairwise moving sample correlation", _pairwise_arg,
295296
_roll_kw, _pairwise_retval, _roll_notes)
296297
@Appender(_doc_template)
297298
def rolling_corr_pairwise(df1, df2=None, window=None, min_periods=None,
298299
freq=None, center=False, time_rule=None):
300+
import warnings
301+
warnings.warn("rolling_corr_pairwise is deprecated, use rolling_corr(..., pairwise=True)", FutureWarning)
299302
return rolling_corr(df1, df2, window=window, min_periods=min_periods,
300303
freq=freq, center=center, time_rule=time_rule,
301304
pairwise=True)
@@ -944,11 +947,14 @@ def expanding_corr(arg1, arg2=None, min_periods=1, freq=None, center=False,
944947
pairwise=pairwise)
945948

946949

947-
@Substitution("Pairwise expanding sample correlation", _pairwise_arg,
950+
@Substitution("Deprecated. Use expanding_corr(..., pairwise=True) instead.\n\n"
951+
"Pairwise expanding sample correlation", _pairwise_arg,
948952
_expanding_kw, _pairwise_retval, "")
949953
@Appender(_doc_template)
950954
def expanding_corr_pairwise(df1, df2=None, min_periods=1, freq=None,
951955
center=False, time_rule=None):
956+
import warnings
957+
warnings.warn("expanding_corr_pairwise is deprecated, use expanding_corr(..., pairwise=True)", FutureWarning)
952958
return expanding_corr(df1, df2, min_periods=min_periods,
953959
freq=freq, center=center, time_rule=time_rule,
954960
pairwise=True)

0 commit comments

Comments
 (0)