Skip to content

Commit 3055ac8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into multiindex_at_fix
2 parents 69f7336 + a6a1ab2 commit 3055ac8

File tree

224 files changed

+5069
-2001
lines changed

Some content is hidden

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

224 files changed

+5069
-2001
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Whether you are a novice or experienced software developer, all contributions and suggestions are welcome!
44

5-
Our main contributing guide can be found [in this repo](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst) or [on the website](https://pandas-docs.github.io/pandas-docs-travis/development/contributing.html). If you do not want to read it in its entirety, we will summarize the main ways in which you can contribute and point to relevant sections of that document for further information.
5+
Our main contributing guide can be found [in this repo](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst) or [on the website](https://pandas.pydata.org/docs/dev/development/contributing.html). If you do not want to read it in its entirety, we will summarize the main ways in which you can contribute and point to relevant sections of that document for further information.
66

77
## Getting Started
88

.github/ISSUE_TEMPLATE/documentation_improvement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ labels: "Docs, Needs Triage"
1111

1212
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://dev.pandas.io/docs/reference/api/pandas.read_csv.html"]
1313

14-
**Note**: You can check the latest versions of the docs on `master` [here](https://dev.pandas.io/docs).
14+
**Note**: You can check the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/).
1515

1616
#### Documentation problem
1717

.github/workflows/ci.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -125,32 +125,18 @@ jobs:
125125
- name: Check ipython directive errors
126126
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127127

128-
- name: Install Rclone
129-
run: sudo apt install rclone -y
130-
if: github.event_name == 'push'
131-
132-
- name: Set up Rclone
128+
- name: Install ssh key
133129
run: |
134-
CONF=$HOME/.config/rclone/rclone.conf
135-
mkdir -p `dirname $CONF`
136-
echo "[ovh_host]" > $CONF
137-
echo "type = swift" >> $CONF
138-
echo "env_auth = false" >> $CONF
139-
echo "auth_version = 3" >> $CONF
140-
echo "auth = https://auth.cloud.ovh.net/v3/" >> $CONF
141-
echo "endpoint_type = public" >> $CONF
142-
echo "tenant_domain = default" >> $CONF
143-
echo "tenant = 2977553886518025" >> $CONF
144-
echo "domain = default" >> $CONF
145-
echo "user = w4KGs3pmDxpd" >> $CONF
146-
echo "key = ${{ secrets.ovh_object_store_key }}" >> $CONF
147-
echo "region = BHS" >> $CONF
130+
mkdir -m 700 -p ~/.ssh
131+
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
132+
chmod 600 ~/.ssh/id_rsa
133+
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
148134
if: github.event_name == 'push'
149135

150-
- name: Sync web with OVH
151-
run: rclone sync --exclude pandas-docs/** web/build ovh_host:prod
136+
- name: Upload web
137+
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
152138
if: github.event_name == 'push'
153139

154-
- name: Sync dev docs with OVH
155-
run: rclone sync doc/build/html ovh_host:prod/pandas-docs/dev
140+
- name: Upload dev docs
141+
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
156142
if: github.event_name == 'push'

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# pandas: powerful Python data analysis toolkit
88
[![PyPI Latest Release](https://img.shields.io/pypi/v/pandas.svg)](https://pypi.org/project/pandas/)
99
[![Conda Latest Release](https://anaconda.org/conda-forge/pandas/badges/version.svg)](https://anaconda.org/anaconda/pandas/)
10+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3509134.svg)](https://doi.org/10.5281/zenodo.3509134)
1011
[![Package Status](https://img.shields.io/pypi/status/pandas.svg)](https://pypi.org/project/pandas/)
1112
[![License](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/master/LICENSE)
1213
[![Travis Build Status](https://travis-ci.org/pandas-dev/pandas.svg?branch=master)](https://travis-ci.org/pandas-dev/pandas)
@@ -158,7 +159,7 @@ Most development discussion is taking place on github in this repo. Further, the
158159

159160
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.
160161

161-
A detailed overview on how to contribute can be found in the **[contributing guide](https://dev.pandas.io/docs/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
162+
A detailed overview on how to contribute can be found in the **[contributing guide](https://pandas.pydata.org/docs/dev/development/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
162163

163164
If you are simply looking to start working with the pandas codebase, navigate to the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) and start looking through interesting issues. There are a number of issues listed under [Docs](https://github.com/pandas-dev/pandas/issues?labels=Docs&sort=updated&state=open) and [good first issue](https://github.com/pandas-dev/pandas/issues?labels=good+first+issue&sort=updated&state=open) where you could start out.
164165

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
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": [],
42+
"Cython": ["0.29.16"],
4343
"matplotlib": [],
4444
"sqlalchemy": [],
4545
"scipy": [],

asv_bench/benchmarks/array.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ def setup(self):
99
self.values_float = np.array([1.0, 0.0, 1.0, 0.0])
1010
self.values_integer = np.array([1, 0, 1, 0])
1111
self.values_integer_like = [1, 0, 1, 0]
12+
self.data = np.array([True, False, True, False])
13+
self.mask = np.array([False, False, True, False])
14+
15+
def time_constructor(self):
16+
pd.arrays.BooleanArray(self.data, self.mask)
1217

1318
def time_from_bool_array(self):
1419
pd.array(self.values_bool, dtype="boolean")
@@ -21,3 +26,16 @@ def time_from_integer_like(self):
2126

2227
def time_from_float_array(self):
2328
pd.array(self.values_float, dtype="boolean")
29+
30+
31+
class IntegerArray:
32+
def setup(self):
33+
self.values_integer = np.array([1, 0, 1, 0])
34+
self.data = np.array([1, 2, 3, 4], dtype="int64")
35+
self.mask = np.array([False, False, True, False])
36+
37+
def time_constructor(self):
38+
pd.arrays.IntegerArray(self.data, self.mask)
39+
40+
def time_from_integer_array(self):
41+
pd.array(self.values_integer, dtype="Int64")

asv_bench/benchmarks/multiindex_object.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,38 @@ def setup(self):
7474
],
7575
dtype=object,
7676
)
77+
self.other_mi_many_mismatches = MultiIndex.from_tuples(
78+
[
79+
(-7, 41),
80+
(-2, 3),
81+
(-0.7, 5),
82+
(0, 0),
83+
(0, 1.5),
84+
(0, 340),
85+
(0, 1001),
86+
(1, -4),
87+
(1, 20),
88+
(1, 1040),
89+
(432, -5),
90+
(432, 17),
91+
(439, 165.5),
92+
(998, -4),
93+
(998, 24065),
94+
(999, 865.2),
95+
(999, 1000),
96+
(1045, -843),
97+
]
98+
)
7799

78100
def time_get_indexer(self):
79101
self.mi_int.get_indexer(self.obj_index)
80102

103+
def time_get_indexer_and_backfill(self):
104+
self.mi_int.get_indexer(self.other_mi_many_mismatches, method="backfill")
105+
106+
def time_get_indexer_and_pad(self):
107+
self.mi_int.get_indexer(self.other_mi_many_mismatches, method="pad")
108+
81109
def time_is_monotonic(self):
82110
self.mi_int.is_monotonic
83111

asv_bench/benchmarks/rolling.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,26 @@ def peakmem_fixed(self):
165165
self.roll.max()
166166

167167

168+
class ForwardWindowMethods:
169+
params = (
170+
["DataFrame", "Series"],
171+
[10, 1000],
172+
["int", "float"],
173+
["median", "mean", "max", "min", "kurt", "sum"],
174+
)
175+
param_names = ["constructor", "window_size", "dtype", "method"]
176+
177+
def setup(self, constructor, window_size, dtype, method):
178+
N = 10 ** 5
179+
arr = np.random.random(N).astype(dtype)
180+
indexer = pd.api.indexers.FixedForwardWindowIndexer(window_size=window_size)
181+
self.roll = getattr(pd, constructor)(arr).rolling(window=indexer)
182+
183+
def time_rolling(self, constructor, window_size, dtype, method):
184+
getattr(self.roll, method)()
185+
186+
def peakmem_rolling(self, constructor, window_size, dtype, method):
187+
getattr(self.roll, method)()
188+
189+
168190
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/code_checks.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
272272
pytest -q --doctest-modules pandas/core/accessor.py
273273
RET=$(($RET + $?)) ; echo $MSG "DONE"
274274

275+
MSG='Doctests aggregation.py' ; echo $MSG
276+
pytest -q --doctest-modules pandas/core/aggregation.py
277+
RET=$(($RET + $?)) ; echo $MSG "DONE"
278+
275279
MSG='Doctests base.py' ; echo $MSG
276280
pytest -q --doctest-modules pandas/core/base.py
277281
RET=$(($RET + $?)) ; echo $MSG "DONE"
@@ -288,10 +292,6 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
288292
pytest -q --doctest-modules pandas/core/generic.py
289293
RET=$(($RET + $?)) ; echo $MSG "DONE"
290294

291-
MSG='Doctests groupby.py' ; echo $MSG
292-
pytest -q --doctest-modules pandas/core/groupby/groupby.py -k"-cumcount -describe -pipe"
293-
RET=$(($RET + $?)) ; echo $MSG "DONE"
294-
295295
MSG='Doctests series.py' ; echo $MSG
296296
pytest -q --doctest-modules pandas/core/series.py
297297
RET=$(($RET + $?)) ; echo $MSG "DONE"
@@ -314,6 +314,10 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
314314
pytest -q --doctest-modules pandas/core/dtypes/
315315
RET=$(($RET + $?)) ; echo $MSG "DONE"
316316

317+
MSG='Doctests groupby' ; echo $MSG
318+
pytest -q --doctest-modules pandas/core/groupby/
319+
RET=$(($RET + $?)) ; echo $MSG "DONE"
320+
317321
MSG='Doctests indexes' ; echo $MSG
318322
pytest -q --doctest-modules pandas/core/indexes/
319323
RET=$(($RET + $?)) ; echo $MSG "DONE"
@@ -348,7 +352,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
348352
RET=$(($RET + $?)) ; echo $MSG "DONE"
349353

350354
MSG='Validate correct capitalization among titles in documentation' ; echo $MSG
351-
$BASE_DIR/scripts/validate_rst_title_capitalization.py $BASE_DIR/doc/source/development/contributing.rst $BASE_DIR/doc/source/reference
355+
$BASE_DIR/scripts/validate_rst_title_capitalization.py $BASE_DIR/doc/source/development $BASE_DIR/doc/source/reference
352356
RET=$(($RET + $?)) ; echo $MSG "DONE"
353357

354358
fi

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ dependencies:
2222
# see comment above
2323
- pip
2424
- pip:
25-
- cython>=0.29.13
25+
- cython>=0.29.16
2626
- pytest>=5.0.1

ci/deps/azure-36-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.*
77

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

ci/deps/azure-36-locale_slow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.*
77

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

ci/deps/azure-36-minimum_versions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.1
77

88
# tools
9-
- cython=0.29.13
9+
- cython=0.29.16
1010
- pytest=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
@@ -22,7 +22,7 @@ dependencies:
2222
- numpy=1.13.3
2323
- openpyxl=2.5.7
2424
- pytables=3.4.2
25-
- python-dateutil=2.6.1
25+
- python-dateutil=2.7.3
2626
- pytz=2017.2
2727
- scipy=0.19.0
2828
- xlrd=1.1.0

ci/deps/azure-37-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
- python=3.7.*
66

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

ci/deps/azure-37-numpydev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ dependencies:
55
- python=3.7.*
66

77
# tools
8-
- cython>=0.29.13
98
- pytest>=5.0.1
109
- pytest-xdist>=1.21
1110
- hypothesis>=3.58.0
@@ -15,6 +14,7 @@ dependencies:
1514
- pytz
1615
- pip
1716
- pip:
17+
- cython>=0.29.16
1818
- "git+git://github.com/dateutil/dateutil.git"
1919
- "-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
2020
- "--pre"

ci/deps/azure-macos-36.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ dependencies:
55
- python=3.6.*
66

77
# tools
8-
- cython>=0.29.13
98
- pytest>=5.0.1
109
- pytest-xdist>=1.21
1110
- hypothesis>=3.58.0
@@ -24,13 +23,14 @@ dependencies:
2423
- openpyxl
2524
- pyarrow>=0.13.0
2625
- pytables
27-
- python-dateutil==2.6.1
26+
- python-dateutil==2.7.3
2827
- pytz
2928
- xarray
3029
- xlrd
3130
- xlsxwriter
3231
- xlwt
3332
- pip
3433
- pip:
34+
- cython>=0.29.16
3535
- pyreadstat
3636
- pyxlsb

ci/deps/azure-windows-36.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.*
77

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

ci/deps/azure-windows-37.yaml

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

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

ci/deps/travis-36-cov.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.*
77

88
# tools
9-
- cython>=0.29.13
9+
- cython>=0.29.16
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
@@ -15,7 +15,7 @@ dependencies:
1515
# pandas dependencies
1616
- beautifulsoup4
1717
- botocore>=1.11
18-
- cython>=0.29.13
18+
- cython>=0.29.16
1919
- dask
2020
- fastparquet>=0.3.2
2121
- gcsfs

ci/deps/travis-36-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.*
77

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

ci/deps/travis-36-slow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.6.*
77

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

ci/deps/travis-37.yaml

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

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

ci/deps/travis-38.yaml

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

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

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@
416416
"python": ("https://docs.python.org/3/", None),
417417
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
418418
"statsmodels": ("https://www.statsmodels.org/devel/", None),
419+
"pyarrow": ("https://arrow.apache.org/docs/", None),
419420
}
420421

421422
# extlinks alias

0 commit comments

Comments
 (0)