Skip to content

DEPR Enforce ewm.vol deprecation #48841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 25, 2022
1 change: 1 addition & 0 deletions doc/source/whatsnew/v2.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Removal of prior version deprecations/changes
- Removed deprecated :meth:`Timedelta.delta`, :meth:`Timedelta.is_populated`, and :attr:`Timedelta.freq` (:issue:`46430`, :issue:`46476`)
- Removed the ``numeric_only`` keyword from :meth:`Categorical.min` and :meth:`Categorical.max` in favor of ``skipna`` (:issue:`48821`)
- Removed :func:`is_extension_type` in favor of :func:`is_extension_array_dtype` (:issue:`29457`)
- Removed :meth:`core.window.ewm.ExponentialMovingWindow.vol` (:issue:`39220`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically core is considered private, can we reference this in another way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Removed the sphinx directive too since this method won't be reference-able

- Removed :meth:`Index.get_value` (:issue:`33907`)
- Remove :meth:`DataFrameGroupBy.pad` and :meth:`DataFrameGroupBy.backfill` (:issue:`45076`)
- Remove ``numpy`` argument from :func:`read_json` (:issue:`30636`)
Expand Down
11 changes: 0 additions & 11 deletions pandas/core/window/ewm.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,17 +677,6 @@ def std(self, bias: bool = False, numeric_only: bool = False, *args, **kwargs):
)
return zsqrt(self.var(bias=bias, numeric_only=numeric_only, **kwargs))

def vol(self, bias: bool = False, *args, **kwargs):
warnings.warn(
(
"vol is deprecated will be removed in a future version. "
"Use std instead."
),
FutureWarning,
stacklevel=find_stack_level(),
)
return self.std(bias, *args, **kwargs)

@doc(
template_header,
create_section_header("Parameters"),
Expand Down
8 changes: 0 additions & 8 deletions pandas/tests/window/test_ewm.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,6 @@ def test_ewm_getitem_attributes_retained(arg, adjust, ignore_na):
assert result == expected


def test_ewm_vol_deprecated():
ser = Series(range(1))
with tm.assert_produces_warning(FutureWarning):
result = ser.ewm(com=0.1).vol()
expected = ser.ewm(com=0.1).std()
tm.assert_series_equal(result, expected)


def test_ewma_times_adjust_false_raises():
# GH 40098
with pytest.raises(
Expand Down