Skip to content

Commit e47bd99

Browse files
committed
DEPR: removal of expanding_corr_pairwise/rolling_cor_pairwise, xref pandas-dev#4950
1 parent 9587d46 commit e47bd99

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

doc/source/whatsnew/v0.18.0.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ Deprecations
220220
Removal of prior version deprecations/changes
221221
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222222

223-
224-
223+
Removal of ``rolling_corr_parwise`` in favor of ``.rolling().corr(pairwise=True)`` (:issue:`4950`)
224+
Removal of ``expanding_corr_parwise`` in favor of ``.expanding().corr(pairwise=True)`` (:issue:`4950`)
225225

226226

227227

pandas/stats/moments.py

+2-28
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
'rolling_sum', 'rolling_mean', 'rolling_std', 'rolling_cov',
1313
'rolling_corr', 'rolling_var', 'rolling_skew', 'rolling_kurt',
1414
'rolling_quantile', 'rolling_median', 'rolling_apply',
15-
'rolling_corr_pairwise', 'rolling_window',
15+
'rolling_window',
1616
'ewma', 'ewmvar', 'ewmstd', 'ewmvol', 'ewmcorr', 'ewmcov',
1717
'expanding_count', 'expanding_max', 'expanding_min',
1818
'expanding_sum', 'expanding_mean', 'expanding_std',
1919
'expanding_cov', 'expanding_corr', 'expanding_var',
2020
'expanding_skew', 'expanding_kurt', 'expanding_quantile',
21-
'expanding_median', 'expanding_apply', 'expanding_corr_pairwise']
21+
'expanding_median', 'expanding_apply' ]
2222

2323
#------------------------------------------------------------------------------
2424
# Docs
@@ -272,20 +272,6 @@ def rolling_corr(arg1, arg2=None, window=None, pairwise=None, **kwargs):
272272
func_kw=['other','pairwise'],
273273
**kwargs)
274274

275-
@Substitution("Deprecated. Use rolling_corr(..., pairwise=True) instead.\n\n"
276-
"Pairwise moving sample correlation", _pairwise_arg,
277-
_roll_kw%'None', _pairwise_retval, _roll_notes)
278-
@Appender(_doc_template)
279-
def rolling_corr_pairwise(df1, df2=None, window=None, min_periods=None,
280-
freq=None, center=False):
281-
import warnings
282-
msg = "rolling_corr_pairwise is deprecated, use rolling_corr(..., pairwise=True)"
283-
warnings.warn(msg, FutureWarning, stacklevel=2)
284-
return rolling_corr(df1, df2, window=window, min_periods=min_periods,
285-
freq=freq, center=center,
286-
pairwise=True)
287-
288-
289275

290276
#------------------------------------------------------------------------------
291277
# Exponential moving moments
@@ -744,18 +730,6 @@ def expanding_corr(arg1, arg2=None, min_periods=1, freq=None, pairwise=None):
744730
freq=freq,
745731
func_kw=['other','pairwise','ddof'])
746732

747-
@Substitution("Deprecated. Use expanding_corr(..., pairwise=True) instead.\n\n"
748-
"Pairwise expanding sample correlation", _pairwise_arg,
749-
_expanding_kw, _pairwise_retval, "")
750-
@Appender(_doc_template)
751-
def expanding_corr_pairwise(df1, df2=None, min_periods=1, freq=None):
752-
import warnings
753-
msg = "expanding_corr_pairwise is deprecated, use expanding_corr(..., pairwise=True)"
754-
warnings.warn(msg, FutureWarning, stacklevel=2)
755-
return expanding_corr(df1, df2, min_periods=min_periods,
756-
freq=freq, pairwise=True)
757-
758-
759733
def expanding_apply(arg, func, min_periods=1, freq=None,
760734
args=(), kwargs={}):
761735
"""Generic expanding function application.

0 commit comments

Comments
 (0)