Skip to content

Commit c71f86e

Browse files
committed
2 parents 96032af + 80f0a74 commit c71f86e

File tree

208 files changed

+2181
-1810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+2181
-1810
lines changed

.github/workflows/stale-pr.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Stale PRs"
2+
on:
3+
schedule:
4+
# * is a special character in YAML so you have to quote this string
5+
- cron: "0 */6 * * *"
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v3
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity."
15+
skip-stale-pr-message: true
16+
stale-pr-label: "Stale"
17+
exempt-pr-labels: "Needs Review,Blocked,Needs Discussion"
18+
days-before-stale: 30
19+
days-before-close: -1
20+
remove-stale-when-updated: true
21+
debug-only: true

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: black
66
language_version: python3
77
- repo: https://gitlab.com/pycqa/flake8
8-
rev: 3.7.7
8+
rev: 3.8.3
99
hooks:
1010
- id: flake8
1111
language: python_venv
@@ -25,7 +25,7 @@ repos:
2525
- file
2626
args: [--append-config=flake8/cython-template.cfg]
2727
- repo: https://github.com/pre-commit/mirrors-isort
28-
rev: v4.3.21
28+
rev: v5.2.2
2929
hooks:
3030
- id: isort
3131
language: python_venv

.travis.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ matrix:
4242

4343
- arch: arm64
4444
env:
45-
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
45+
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)"
4646

4747
- env:
4848
- JOB="3.7, locale" ENV_FILE="ci/deps/travis-37-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
@@ -58,13 +58,6 @@ matrix:
5858
services:
5959
- mysql
6060
- postgresql
61-
allow_failures:
62-
- arch: arm64
63-
env:
64-
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
65-
- dist: bionic
66-
env:
67-
- JOB="3.9-dev" PATTERN="(not slow and not network and not clipboard)"
6861

6962

7063
before_install:

asv_bench/asv.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// followed by the pip installed packages).
4040
"matrix": {
4141
"numpy": [],
42-
"Cython": ["0.29.16"],
42+
"Cython": ["0.29.21"],
4343
"matplotlib": [],
4444
"sqlalchemy": [],
4545
"scipy": [],

ci/build39.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
sudo apt-get install build-essential gcc xvfb
55
pip install --no-deps -U pip wheel setuptools
6-
pip install numpy python-dateutil pytz pytest pytest-xdist hypothesis
7-
pip install cython --pre # https://github.com/cython/cython/issues/3395
6+
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis
87

98
python setup.py build_ext -inplace
109
python -m pip install --no-build-isolation -e .

ci/deps/azure-37-32bit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ dependencies:
2121
# see comment above
2222
- pip
2323
- pip:
24-
- cython>=0.29.16
24+
- cython>=0.29.21
2525
- numpy>=1.16.5
2626
- pytest>=5.0.1

ci/deps/azure-37-locale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- pytest-asyncio

ci/deps/azure-37-locale_slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/azure-37-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
- python=3.7.1
66

77
# tools
8-
- cython=0.29.16
8+
- cython=0.29.21
99
- pytest=5.0.1
1010
- pytest-xdist>=1.21
1111
- hypothesis>=3.58.0

ci/deps/azure-37-slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/azure-38-locale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
- python=3.8.*
66

77
# tools
8-
- cython>=0.29.16
8+
- cython>=0.29.21
99
- pytest>=5.0.1
1010
- pytest-xdist>=1.21
1111
- pytest-asyncio>=0.12.0

ci/deps/azure-38-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- pytz
1515
- pip
1616
- pip:
17-
- cython==0.29.16 # GH#34014
17+
- cython==0.29.21 # GH#34014
1818
- "git+git://github.com/dateutil/dateutil.git"
1919
- "--extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple"
2020
- "--pre"

ci/deps/azure-macos-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ dependencies:
3131
- xlwt
3232
- pip
3333
- pip:
34-
- cython>=0.29.16
34+
- cython>=0.29.21
3535
- pyreadstat
3636
- pyxlsb

ci/deps/azure-windows-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/azure-windows-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.8.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/travis-37-arm64.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.7.*
76

87
# tools
9-
- cython>=0.29.13
8+
- cython>=0.29.21
109
- pytest>=5.0.1
1110
- pytest-xdist>=1.21
1211
- hypothesis>=3.58.0

ci/deps/travis-37-cov.yaml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.7.*
76

87
# tools
9-
- cython>=0.29.16
8+
- cython>=0.29.21
109
- pytest>=5.0.1
1110
- pytest-xdist>=1.21
1211
- hypothesis>=3.58.0
@@ -15,7 +14,6 @@ dependencies:
1514
# pandas dependencies
1615
- beautifulsoup4
1716
- botocore>=1.11
18-
- cython>=0.29.16
1917
- dask
2018
- fastparquet>=0.3.2
2119
- fsspec>=0.7.4
@@ -31,16 +29,18 @@ dependencies:
3129
- odfpy
3230
- openpyxl
3331
- pandas-gbq
32+
- google-cloud-bigquery>=1.27.2 # GH 36436
3433
- psycopg2
3534
- pyarrow>=0.15.0
36-
- pymysql
35+
- pymysql=0.7.11
3736
- pytables
3837
- python-snappy
38+
- python-dateutil
3939
- pytz
4040
- s3fs>=0.4.0
4141
- scikit-learn
4242
- scipy
43-
- sqlalchemy
43+
- sqlalchemy=1.3.0
4444
- statsmodels
4545
- xarray
4646
- xlrd
@@ -51,5 +51,4 @@ dependencies:
5151
- brotlipy
5252
- coverage
5353
- pandas-datareader
54-
- python-dateutil
5554
- pyxlsb

ci/deps/travis-37-locale.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
@@ -25,10 +25,10 @@ dependencies:
2525
- numexpr
2626
- numpy
2727
- openpyxl
28-
- pandas-gbq=0.12.0
28+
- pandas-gbq
29+
- google-cloud-bigquery>=1.27.2 # GH 36436
2930
- pyarrow>=0.17
3031
- psycopg2=2.7
31-
- pyarrow>=0.15.0 # GH #35813
3232
- pymysql=0.7.11
3333
- pytables
3434
- python-dateutil

ci/deps/travis-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/travis-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.8.*
77

88
# tools
9-
- cython>=0.29.16
9+
- cython>=0.29.21
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/setup_env.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ else
4242
fi
4343

4444
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
45+
sudo apt-get update
4546
sudo apt-get -y install xvfb
46-
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh"
47+
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.5-0/Miniforge3-4.8.5-0-Linux-aarch64.sh"
4748
else
4849
CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh"
4950
fi

doc/make.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def main():
291291

292292
joined = ", ".join(cmds)
293293
argparser.add_argument(
294-
"command", nargs="?", default="html", help=f"command to run: {joined}",
294+
"command", nargs="?", default="html", help=f"command to run: {joined}"
295295
)
296296
argparser.add_argument(
297297
"--num-jobs", type=int, default=0, help="number of jobs used by sphinx-build"

doc/source/development/extending.rst

-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ applies only to certain dtypes.
7373
Extension types
7474
---------------
7575

76-
.. versionadded:: 0.23.0
77-
7876
.. warning::
7977

8078
The :class:`pandas.api.extensions.ExtensionDtype` and :class:`pandas.api.extensions.ExtensionArray` APIs are new and

doc/source/ecosystem.rst

+7
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ HTTP API, and also provides several convenient methods for parsing and analyzing
303303
fredapi makes use of pandas and returns data in a Series or DataFrame. This module requires a FRED API key that
304304
you can obtain for free on the FRED website.
305305

306+
`dataframe_sql <https://github.com/zbrookle/dataframe_sql>`__
307+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
308+
``dataframe_sql`` is a Python package that translates SQL syntax directly into
309+
operations on pandas DataFrames. This is useful when migrating from a database to
310+
using pandas or for users more comfortable with SQL looking for a way to interface
311+
with pandas.
312+
306313

307314
.. _ecosystem.domain:
308315

doc/source/getting_started/install.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Instructions for installing from source,
1818
Python version support
1919
----------------------
2020

21-
Officially Python 3.7.1 and above, and 3.8.
21+
Officially Python 3.7.1 and above, 3.8, and 3.9.
2222

2323
Installing pandas
2424
-----------------
@@ -301,8 +301,6 @@ Optional dependencies for parsing HTML
301301
One of the following combinations of libraries is needed to use the
302302
top-level :func:`~pandas.read_html` function:
303303

304-
.. versionchanged:: 0.23.0
305-
306304
* `BeautifulSoup4`_ and `html5lib`_
307305
* `BeautifulSoup4`_ and `lxml`_
308306
* `BeautifulSoup4`_ and `html5lib`_ and `lxml`_

doc/source/user_guide/advanced.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1065,8 +1065,6 @@ are closed on. Intervals are closed on the right side by default.
10651065
10661066
pd.interval_range(start=0, end=4, closed='neither')
10671067
1068-
.. versionadded:: 0.23.0
1069-
10701068
Specifying ``start``, ``end``, and ``periods`` will generate a range of evenly spaced
10711069
intervals from ``start`` to ``end`` inclusively, with ``periods`` number of elements
10721070
in the resulting ``IntervalIndex``:

doc/source/user_guide/basics.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1877,8 +1877,6 @@ different columns.
18771877
By indexes and values
18781878
~~~~~~~~~~~~~~~~~~~~~
18791879

1880-
.. versionadded:: 0.23.0
1881-
18821880
Strings passed as the ``by`` parameter to :meth:`DataFrame.sort_values` may
18831881
refer to either columns or index level names.
18841882

doc/source/user_guide/categorical.rst

-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ only labels present in a given column are categories:
112112
df['B']
113113
114114
115-
.. versionadded:: 0.23.0
116-
117115
Analogously, all columns in an existing ``DataFrame`` can be batch converted using :meth:`DataFrame.astype`:
118116

119117
.. ipython:: python

doc/source/user_guide/computation.rst

+9
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ see the :ref:`groupby docs <groupby.transform.window_resample>`.
229229

230230
The API for window statistics is quite similar to the way one works with ``GroupBy`` objects, see the documentation :ref:`here <groupby>`.
231231

232+
.. warning::
233+
234+
When using ``rolling()`` and an associated function the results are calculated with rolling sums. As a consequence
235+
when having values differing with magnitude :math:`1/np.finfo(np.double).eps` this results in truncation. It must be
236+
noted, that large values may have an impact on windows, which do not include these values. `Kahan summation
237+
<https://en.wikipedia.org/wiki/Kahan_summation_algorithm>`__ is used
238+
to compute the rolling sums to preserve accuracy as much as possible. The same holds true for ``Rolling.var()`` for
239+
values differing with magnitude :math:`(1/np.finfo(np.double).eps)^{0.5}`.
240+
232241
We work with ``rolling``, ``expanding`` and ``exponentially weighted`` data through the corresponding
233242
objects, :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expanding` and :class:`~pandas.core.window.ExponentialMovingWindow`.
234243

doc/source/user_guide/dsintro.rst

-2
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,6 @@ to be inserted (for example, a ``Series`` or NumPy array), or a function
597597
of one argument to be called on the ``DataFrame``. A *copy* of the original
598598
DataFrame is returned, with the new values inserted.
599599

600-
.. versionchanged:: 0.23.0
601-
602600
Starting with Python 3.6 the order of ``**kwargs`` is preserved. This allows
603601
for *dependent* assignment, where an expression later in ``**kwargs`` can refer
604602
to a column created earlier in the same :meth:`~DataFrame.assign`.

0 commit comments

Comments
 (0)