-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: explain EWM #34901
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
DOC: explain EWM #34901
Changes from 3 commits
fb5eac0
c165fc3
2e0386c
e726629
f95216c
d4343e3
38ca722
b10bc72
61f316b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10460,7 +10460,7 @@ def _add_series_or_dataframe_operations(cls): | |
Add the series or dataframe only operations to the cls; evaluate | ||
the doc strings again. | ||
""" | ||
from pandas.core.window import EWM, Expanding, Rolling, Window | ||
from pandas.core.window import EWF, Expanding, Rolling, Window | ||
|
||
@doc(Rolling) | ||
def rolling( | ||
|
@@ -10507,7 +10507,7 @@ def expanding(self, min_periods=1, center=False, axis=0): | |
|
||
cls.expanding = expanding | ||
|
||
@doc(EWM) | ||
@doc(EWF) | ||
def ewm( | ||
self, | ||
com=None, | ||
|
@@ -10520,7 +10520,7 @@ def ewm( | |
axis=0, | ||
): | ||
axis = self._get_axis_number(axis) | ||
return EWM( | ||
return EWF( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still need to change? |
||
self, | ||
com=com, | ||
span=span, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from pandas.core.window.ewm import EWM # noqa:F401 | ||
from pandas.core.window.ewf import EWF # noqa:F401 | ||
from pandas.core.window.expanding import Expanding, ExpandingGroupby # noqa:F401 | ||
from pandas.core.window.rolling import Rolling, RollingGroupby, Window # noqa:F401 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,11 +59,11 @@ def get_center_of_mass( | |
return float(comass) | ||
|
||
|
||
class EWM(_Rolling): | ||
class Exponential_moving(_Rolling): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure |
||
r""" | ||
Provide exponential weighted (EW) functions. | ||
Provide exponential weighted Functions(EWF). | ||
|
||
Available EW functions: ``mean()``, ``var()``, ``std()``, ``corr()``, ``cov()``. | ||
Available functions: ``mean()``, ``var()``, ``std()``, ``corr()``, ``cov()``. | ||
|
||
Exactly one parameter: ``com``, ``span``, ``halflife``, or ``alpha`` must be | ||
provided. | ||
|
@@ -185,7 +185,7 @@ def __init__( | |
|
||
@property | ||
def _constructor(self): | ||
return EWM | ||
return EWF | ||
|
||
_agg_see_also_doc = dedent( | ||
""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would be ok with actually writing this classname out if we are going to change it, e.g. ExponentialMoving or ExponentialMovingWindow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good might as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick one could you clarify what you mean by writing it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @jreback meant you could rename
EWM
toExponentialMoving
orExponentialMovingWindow
incore.window.ewm.py
where the class is createdThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes resolved