Skip to content

Commit c970ce2

Browse files
author
KrishnaSai2020
committed
pep 8 issues
1 parent c37c94b commit c970ce2

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

doc/redirects.csv

+5-5
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ generated/pandas.core.resample.Resampler.std,../reference/api/pandas.core.resamp
269269
generated/pandas.core.resample.Resampler.sum,../reference/api/pandas.core.resample.Resampler.sum
270270
generated/pandas.core.resample.Resampler.transform,../reference/api/pandas.core.resample.Resampler.transform
271271
generated/pandas.core.resample.Resampler.var,../reference/api/pandas.core.resample.Resampler.var
272-
generated/pandas.core.window.EWM.corr,../reference/api/pandas.core.window.EWM.corr
273-
generated/pandas.core.window.EWM.cov,../reference/api/pandas.core.window.EWM.cov
274-
generated/pandas.core.window.EWM.mean,../reference/api/pandas.core.window.EWM.mean
275-
generated/pandas.core.window.EWM.std,../reference/api/pandas.core.window.EWM.std
276-
generated/pandas.core.window.EWM.var,../reference/api/pandas.core.window.EWM.var
272+
generated/pandas.core.window.ExponentialMovingWindow.corr,../reference/api/pandas.core.window.ExponentialMovingWindow.corr
273+
generated/pandas.core.window.ExponentialMovingWindow.cov,../reference/api/pandas.core.window.ExponentialMovingWindow.cov
274+
generated/pandas.core.window.ExponentialMovingWindow.mean,../reference/api/pandas.core.window.ExponentialMovingWindow.mean
275+
generated/pandas.core.window.ExponentialMovingWindow.std,../reference/api/pandas.core.window.ExponentialMovingWindow.std
276+
generated/pandas.core.window.ExponentialMovingWindow.var,../reference/api/pandas.core.window.ExponentialMovingWindow.var
277277
generated/pandas.core.window.Expanding.aggregate,../reference/api/pandas.core.window.Expanding.aggregate
278278
generated/pandas.core.window.Expanding.apply,../reference/api/pandas.core.window.Expanding.apply
279279
generated/pandas.core.window.Expanding.corr,../reference/api/pandas.core.window.Expanding.corr

doc/source/reference/window.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Window
88

99
Rolling objects are returned by ``.rolling`` calls: :func:`pandas.DataFrame.rolling`, :func:`pandas.Series.rolling`, etc.
1010
Expanding objects are returned by ``.expanding`` calls: :func:`pandas.DataFrame.expanding`, :func:`pandas.Series.expanding`, etc.
11-
EWM objects are returned by ``.ewm`` calls: :func:`pandas.DataFrame.ewm`, :func:`pandas.Series.ewm`, etc.
11+
ExponentialMovingWindow objects are returned by ``.ewm`` calls: :func:`pandas.DataFrame.ewm`, :func:`pandas.Series.ewm`, etc.
1212

1313
Standard moving window functions
1414
--------------------------------
@@ -69,11 +69,11 @@ Exponentially-weighted moving window functions
6969
.. autosummary::
7070
:toctree: api/
7171

72-
EWM.mean
73-
EWM.std
74-
EWM.var
75-
EWM.corr
76-
EWM.cov
72+
ExponentialMovingWindow.mean
73+
ExponentialMovingWindow.std
74+
ExponentialMovingWindow.var
75+
ExponentialMovingWindow.corr
76+
ExponentialMovingWindow.cov
7777

7878
Window indexer
7979
--------------

doc/source/user_guide/computation.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ see the :ref:`groupby docs <groupby.transform.window_resample>`.
230230
The API for window statistics is quite similar to the way one works with ``GroupBy`` objects, see the documentation :ref:`here <groupby>`.
231231

232232
We work with ``rolling``, ``expanding`` and ``exponentially weighted`` data through the corresponding
233-
objects, :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expanding` and :class:`~pandas.core.window.EWM`.
233+
objects, :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expanding` and :class:`~pandas.core.window.ExponentialMovingWindow`.
234234

235235
.. ipython:: python
236236
@@ -777,7 +777,7 @@ columns by reshaping and indexing:
777777
Aggregation
778778
-----------
779779

780-
Once the ``Rolling``, ``Expanding`` or ``EWM`` objects have been created, several methods are available to
780+
Once the ``Rolling``, ``Expanding`` or ``ExponentialMovingWindow`` objects have been created, several methods are available to
781781
perform multiple computations on the data. These operations are similar to the :ref:`aggregating API <basics.aggregate>`,
782782
:ref:`groupby API <groupby.aggregate>`, and :ref:`resample API <timeseries.aggregate>`.
783783

@@ -971,7 +971,7 @@ Exponentially weighted windows
971971

972972
A related set of functions are exponentially weighted versions of several of
973973
the above statistics. A similar interface to ``.rolling`` and ``.expanding`` is accessed
974-
through the ``.ewm`` method to receive an :class:`~EWM` object.
974+
through the ``.ewm`` method to receive an :class:`~ExponentialMovingWindow` object.
975975
A number of expanding EW (exponentially weighted)
976976
methods are provided:
977977

@@ -980,11 +980,11 @@ methods are provided:
980980
:header: "Function", "Description"
981981
:widths: 20, 80
982982

983-
:meth:`~EWM.mean`, EW moving average
984-
:meth:`~EWM.var`, EW moving variance
985-
:meth:`~EWM.std`, EW moving standard deviation
986-
:meth:`~EWM.corr`, EW moving correlation
987-
:meth:`~EWM.cov`, EW moving covariance
983+
:meth:`~ExponentialMovingWindow.mean`, EW moving average
984+
:meth:`~ExponentialMovingWindow.var`, EW moving variance
985+
:meth:`~ExponentialMovingWindow.std`, EW moving standard deviation
986+
:meth:`~ExponentialMovingWindow.corr`, EW moving correlation
987+
:meth:`~ExponentialMovingWindow.cov`, EW moving covariance
988988

989989
In general, a weighted moving average is calculated as
990990

@@ -1090,12 +1090,12 @@ Here is an example for a univariate time series:
10901090
@savefig ewma_ex.png
10911091
s.ewm(span=20).mean().plot(style='k')
10921092
1093-
EWM has a ``min_periods`` argument, which has the same
1093+
ExponentialMovingWindow has a ``min_periods`` argument, which has the same
10941094
meaning it does for all the ``.expanding`` and ``.rolling`` methods:
10951095
no output values will be set until at least ``min_periods`` non-null values
10961096
are encountered in the (expanding) window.
10971097

1098-
EWM also has an ``ignore_na`` argument, which determines how
1098+
ExponentialMovingWindow also has an ``ignore_na`` argument, which determines how
10991099
intermediate null values affect the calculation of the weights.
11001100
When ``ignore_na=False`` (the default), weights are calculated based on absolute
11011101
positions, so that intermediate null values affect the result.

doc/source/whatsnew/v0.25.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ Groupby/resample/rolling
12061206
- Bug in :meth:`pandas.core.groupby.GroupBy.agg` where incorrect results are returned for uint64 columns. (:issue:`26310`)
12071207
- Bug in :meth:`pandas.core.window.Rolling.median` and :meth:`pandas.core.window.Rolling.quantile` where MemoryError is raised with empty window (:issue:`26005`)
12081208
- Bug in :meth:`pandas.core.window.Rolling.median` and :meth:`pandas.core.window.Rolling.quantile` where incorrect results are returned with ``closed='left'`` and ``closed='neither'`` (:issue:`26005`)
1209-
- Improved :class:`pandas.core.window.Rolling`, :class:`pandas.core.window.Window` and :class:`pandas.core.window.EWM` functions to exclude nuisance columns from results instead of raising errors and raise a ``DataError`` only if all columns are nuisance (:issue:`12537`)
1209+
- Improved :class:`pandas.core.window.Rolling`, :class:`pandas.core.window.Window` and :class:`pandas.core.window.ExponentialMovingWindow` functions to exclude nuisance columns from results instead of raising errors and raise a ``DataError`` only if all columns are nuisance (:issue:`12537`)
12101210
- Bug in :meth:`pandas.core.window.Rolling.max` and :meth:`pandas.core.window.Rolling.min` where incorrect results are returned with an empty variable window (:issue:`26005`)
12111211
- Raise a helpful exception when an unsupported weighted window function is used as an argument of :meth:`pandas.core.window.Window.aggregate` (:issue:`26597`)
12121212

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7288,7 +7288,7 @@ def _gotitem(
72887288
core.resample.Resampler : Perform operations over resampled bins.
72897289
core.window.Rolling : Perform operations over rolling window.
72907290
core.window.Expanding : Perform operations over expanding window.
7291-
core.window.EWM : Perform operation over exponential weighted
7291+
core.window.ExponentialMovingWindow : Perform operation over exponential weighted
72927292
window.
72937293
"""
72947294
)
@@ -8171,7 +8171,7 @@ def cov(self, min_periods=None) -> "DataFrame":
81718171
See Also
81728172
--------
81738173
Series.cov : Compute covariance with another Series.
8174-
core.window.EWM.cov: Exponential weighted sample covariance.
8174+
core.window.ExponentialMovingWindow.cov: Exponential weighted sample covariance.
81758175
core.window.Expanding.cov : Expanding sample covariance.
81768176
core.window.Rolling.cov : Rolling sample covariance.
81778177

0 commit comments

Comments
 (0)