Skip to content

Commit 896b29a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into remove-frame-or-series-check
2 parents 7e0bda3 + 0b68d87 commit 896b29a

File tree

26 files changed

+770
-52
lines changed

26 files changed

+770
-52
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- master
99
- 1.2.x
10+
- 1.3.x
1011

1112
env:
1213
ENV_FILE: environment.yml

.github/workflows/database.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- master
99
- 1.2.x
10+
- 1.3.x
11+
paths-ignore:
12+
- "doc/**"
1013

1114
env:
1215
PYTEST_WORKERS: "auto"

.github/workflows/posix.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- master
99
- 1.2.x
10+
- 1.3.x
11+
paths-ignore:
12+
- "doc/**"
1013

1114
env:
1215
PYTEST_WORKERS: "auto"

.github/workflows/python-dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- master
10+
paths-ignore:
11+
- "doc/**"
1012

1113
jobs:
1214
build:

MANIFEST.in

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ global-exclude *.h5
1717
global-exclude *.html
1818
global-exclude *.json
1919
global-exclude *.jsonl
20+
global-exclude *.msgpack
2021
global-exclude *.pdf
2122
global-exclude *.pickle
2223
global-exclude *.png
2324
global-exclude *.pptx
24-
global-exclude *.pyc
25-
global-exclude *.pyd
2625
global-exclude *.ods
2726
global-exclude *.odt
27+
global-exclude *.orc
2828
global-exclude *.sas7bdat
2929
global-exclude *.sav
3030
global-exclude *.so
3131
global-exclude *.xls
32+
global-exclude *.xlsb
3233
global-exclude *.xlsm
3334
global-exclude *.xlsx
3435
global-exclude *.xpt
@@ -39,6 +40,13 @@ global-exclude .DS_Store
3940
global-exclude .git*
4041
global-exclude \#*
4142

43+
global-exclude *.c
44+
global-exclude *.cpp
45+
global-exclude *.h
46+
47+
global-exclude *.py[ocd]
48+
global-exclude *.pxi
49+
4250
# GH 39321
4351
# csv_dir_path fixture checks the existence of the directory
4452
# exclude the whole directory to avoid running related tests in sdist
@@ -47,3 +55,6 @@ prune pandas/tests/io/parser/data
4755
include versioneer.py
4856
include pandas/_version.py
4957
include pandas/io/formats/templates/*.tpl
58+
59+
graft pandas/_libs/src
60+
graft pandas/_libs/tslibs/src

azure-pipelines.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
22
trigger:
3-
- master
4-
- 1.2.x
3+
branches:
4+
include:
5+
- master
6+
- 1.2.x
7+
- 1.3.x
8+
paths:
9+
exclude:
10+
- 'doc/*'
511

612
pr:
713
- master
814
- 1.2.x
15+
- 1.3.x
916

1017
variables:
1118
PYTEST_WORKERS: auto

ci/deps/azure-macos-37.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- numexpr
2323
- numpy=1.17.3
2424
- openpyxl
25-
- pyarrow=0.17.0
25+
- pyarrow=0.17
2626
- pytables
2727
- python-dateutil==2.7.3
2828
- pytz

doc/source/user_guide/window.rst

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ pandas supports 4 types of windowing operations:
3737
#. Expanding window: Accumulating window over the values.
3838
#. Exponentially Weighted window: Accumulating and exponentially weighted window over the values.
3939

40-
============================= ================= =========================== =========================== ======================== ===================================
41-
Concept Method Returned Object Supports time-based windows Supports chained groupby Supports table method
42-
============================= ================= =========================== =========================== ======================== ===================================
43-
Rolling window ``rolling`` ``Rolling`` Yes Yes Yes (as of version 1.3)
44-
Weighted window ``rolling`` ``Window`` No No No
45-
Expanding window ``expanding`` ``Expanding`` No Yes Yes (as of version 1.3)
46-
Exponentially Weighted window ``ewm`` ``ExponentialMovingWindow`` No Yes (as of version 1.2) No
47-
============================= ================= =========================== =========================== ======================== ===================================
40+
============================= ================= =========================== =========================== ======================== =================================== ===========================
41+
Concept Method Returned Object Supports time-based windows Supports chained groupby Supports table method Supports online operations
42+
============================= ================= =========================== =========================== ======================== =================================== ===========================
43+
Rolling window ``rolling`` ``Rolling`` Yes Yes Yes (as of version 1.3) No
44+
Weighted window ``rolling`` ``Window`` No No No No
45+
Expanding window ``expanding`` ``Expanding`` No Yes Yes (as of version 1.3) No
46+
Exponentially Weighted window ``ewm`` ``ExponentialMovingWindow`` No Yes (as of version 1.2) No Yes (as of version 1.3)
47+
============================= ================= =========================== =========================== ======================== =================================== ===========================
4848

4949
As noted above, some operations support specifying a window based on a time offset:
5050

@@ -98,6 +98,26 @@ be calculated with :meth:`~Rolling.apply` by specifying a separate column of wei
9898
df = pd.DataFrame([[1, 2, 0.6], [2, 3, 0.4], [3, 4, 0.2], [4, 5, 0.7]])
9999
df.rolling(2, method="table", min_periods=0).apply(weighted_mean, raw=True, engine="numba") # noqa:E501
100100
101+
.. versionadded:: 1.3
102+
103+
Some windowing operations also support an ``online`` method after constructing a windowing object
104+
which returns a new object that supports passing in new :class:`DataFrame` or :class:`Series` objects
105+
to continue the windowing calculation with the new values (i.e. online calculations).
106+
107+
The methods on this new windowing objects must call the aggregation method first to "prime" the initial
108+
state of the online calculation. Then, new :class:`DataFrame` or :class:`Series` objects can be passed in
109+
the ``update`` argument to continue the windowing calculation.
110+
111+
.. ipython:: python
112+
113+
df = pd.DataFrame([[1, 2, 0.6], [2, 3, 0.4], [3, 4, 0.2], [4, 5, 0.7]])
114+
df.ewm(0.5).mean()
115+
116+
.. ipython:: python
117+
118+
online_ewm = df.head(2).ewm(0.5).online()
119+
online_ewm.mean()
120+
online_ewm.mean(update=df.tail(1))
101121
102122
All windowing operations support a ``min_periods`` argument that dictates the minimum amount of
103123
non-``np.nan`` values a window must have; otherwise, the resulting value is ``np.nan``.

doc/source/whatsnew/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ This is the list of changes to pandas between each release. For full details,
1010
see the `commit logs <https://github.com/pandas-dev/pandas/commits/>`_. For install and
1111
upgrade instructions, see :ref:`install`.
1212

13+
Version 1.4
14+
-----------
15+
16+
.. toctree::
17+
:maxdepth: 2
18+
19+
v1.4.0
20+
1321
Version 1.3
1422
-----------
1523

doc/source/whatsnew/v1.3.0.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ For example:
239239
Other enhancements
240240
^^^^^^^^^^^^^^^^^^
241241

242-
- :meth:`DataFrame.rolling`, :meth:`Series.rolling`, :meth:`DataFrame.expanding`, and :meth:`Series.expanding` now support a ``method`` argument with a ``'table'`` option that performs the windowing operation over an entire DataFrame. See :ref:`Window Overview <window.overview>` for performance and functional benefits (:issue:`15095`, :issue:`38995`)
242+
- :meth:`DataFrame.rolling`, :meth:`Series.rolling`, :meth:`DataFrame.expanding`, and :meth:`Series.expanding` now support a ``method`` argument with a ``'table'`` option that performs the windowing operation over an entire :class:`DataFrame`. See :ref:`Window Overview <window.overview>` for performance and functional benefits (:issue:`15095`, :issue:`38995`)
243+
- :class:`.ExponentialMovingWindow` now support a ``online`` method that can perform ``mean`` calculations in an online fashion. See :ref:`Window Overview <window.overview>` (:issue:`41673`)
243244
- Added :meth:`MultiIndex.dtypes` (:issue:`37062`)
244245
- Added ``end`` and ``end_day`` options for the ``origin`` argument in :meth:`DataFrame.resample` (:issue:`37804`)
245246
- Improved error message when ``usecols`` and ``names`` do not match for :func:`read_csv` and ``engine="c"`` (:issue:`29042`)

0 commit comments

Comments
 (0)