Skip to content

Commit 11a3790

Browse files
committed
merging master
2 parents 85dd25c + daec2e7 commit 11a3790

File tree

262 files changed

+5248
-3368
lines changed

Some content is hidden

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

262 files changed

+5248
-3368
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
push:
55
branches:
66
- master
7+
- 1.3.x
78
pull_request:
89
branches:
910
- master
10-
- 1.2.x
1111
- 1.3.x
1212

1313
env:
@@ -24,7 +24,7 @@ jobs:
2424

2525
concurrency:
2626
group: ${{ github.ref }}-checks
27-
cancel-in-progress: true
27+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
2828

2929
steps:
3030
- name: Checkout
@@ -133,15 +133,15 @@ jobs:
133133
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
134134
chmod 600 ~/.ssh/id_rsa
135135
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
136-
if: github.event_name == 'push'
136+
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
137137

138138
- name: Upload web
139139
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
140-
if: github.event_name == 'push'
140+
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
141141

142142
- name: Upload dev docs
143143
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
144-
if: github.event_name == 'push'
144+
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
145145

146146
- name: Move docs into site directory
147147
run: mv doc/build/html web/build/docs

.github/workflows/database.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
pull_request:
88
branches:
99
- master
10-
- 1.2.x
1110
- 1.3.x
1211
paths-ignore:
1312
- "doc/**"
@@ -19,20 +18,20 @@ env:
1918
COVERAGE: true
2019

2120
jobs:
22-
Linux_py37_IO:
21+
Linux_py38_IO:
2322
runs-on: ubuntu-latest
2423
defaults:
2524
run:
2625
shell: bash -l {0}
2726

2827
strategy:
2928
matrix:
30-
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
29+
ENV_FILE: [ci/deps/actions-38-db-min.yaml, ci/deps/actions-38-db.yaml]
3130
fail-fast: false
3231

3332
concurrency:
3433
group: ${{ github.ref }}-${{ matrix.ENV_FILE }}
35-
cancel-in-progress: true
34+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
3635

3736
services:
3837
mysql:

.github/workflows/posix.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
push:
55
branches:
66
- master
7+
- 1.3.x
78
pull_request:
89
branches:
910
- master
10-
- 1.2.x
1111
- 1.3.x
1212
paths-ignore:
1313
- "doc/**"
@@ -25,14 +25,13 @@ jobs:
2525
strategy:
2626
matrix:
2727
settings: [
28-
[actions-37-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
29-
[actions-37.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
30-
[actions-37-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
31-
[actions-37-slow.yaml, "slow", "", "", "", "", ""],
28+
[actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
29+
[actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
3230
[actions-38.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
3331
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
3432
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
35-
[actions-38-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
33+
[actions-39-slow.yaml, "slow", "", "", "", "", ""],
34+
[actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
3635
[actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""]
3736
]
3837
fail-fast: false
@@ -47,7 +46,7 @@ jobs:
4746
TEST_ARGS: ${{ matrix.settings[6] }}
4847
concurrency:
4948
group: ${{ github.ref }}-${{ matrix.settings[0] }}
50-
cancel-in-progress: true
49+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
5150

5251
steps:
5352
- name: Checkout

.github/workflows/pre-commit.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ on:
55
push:
66
branches:
77
- master
8+
- 1.3.x
89

910
jobs:
1011
pre-commit:
1112
runs-on: ubuntu-latest
1213
concurrency:
1314
group: ${{ github.ref }}-pre-commit
14-
cancel-in-progress: true
15+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
1516
steps:
1617
- uses: actions/checkout@v2
1718
- uses: actions/setup-python@v2

.github/workflows/python-dev.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches:
66
- master
7+
- 1.3.x
78
pull_request:
89
branches:
910
- master
11+
- 1.3.x
1012
paths-ignore:
1113
- "doc/**"
1214

@@ -24,7 +26,7 @@ jobs:
2426

2527
concurrency:
2628
group: ${{ github.ref }}-dev
27-
cancel-in-progress: true
29+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
2830

2931
steps:
3032
- uses: actions/checkout@v2

.github/workflows/sdist.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
push:
55
branches:
66
- master
7+
- 1.3.x
78
pull_request:
89
branches:
910
- master
10-
- 1.2.x
1111
- 1.3.x
1212
paths-ignore:
1313
- "doc/**"
@@ -23,7 +23,10 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.7", "3.8", "3.9"]
26+
python-version: ["3.8", "3.9"]
27+
concurrency:
28+
group: ${{github.ref}}-${{matrix.python-version}}-sdist
29+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
2730

2831
steps:
2932
- uses: actions/checkout@v2

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ repos:
5353
types: [text]
5454
args: [--append-config=flake8/cython-template.cfg]
5555
- repo: https://github.com/PyCQA/isort
56-
rev: 5.9.1
56+
rev: 5.9.2
5757
hooks:
5858
- id: isort
5959
- repo: https://github.com/asottile/pyupgrade
60-
rev: v2.19.4
60+
rev: v2.21.0
6161
hooks:
6262
- id: pyupgrade
63-
args: [--py37-plus]
63+
args: [--py38-plus]
6464
- repo: https://github.com/pre-commit/pygrep-hooks
6565
rev: v1.9.0
6666
hooks:

asv_bench/benchmarks/algos/isin.py

+3-15
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import numpy as np
22

3-
try:
4-
from pandas.compat import np_version_under1p20
5-
except ImportError:
6-
from pandas.compat.numpy import _np_version_under1p20 as np_version_under1p20
7-
83
from pandas import (
94
Categorical,
105
NaT,
@@ -283,10 +278,6 @@ class IsInLongSeriesLookUpDominates:
283278
def setup(self, dtype, MaxNumber, series_type):
284279
N = 10 ** 7
285280

286-
# https://github.com/pandas-dev/pandas/issues/39844
287-
if not np_version_under1p20 and dtype in ("Int64", "Float64"):
288-
raise NotImplementedError
289-
290281
if series_type == "random_hits":
291282
array = np.random.randint(0, MaxNumber, N)
292283
if series_type == "random_misses":
@@ -297,7 +288,8 @@ def setup(self, dtype, MaxNumber, series_type):
297288
array = np.arange(N) + MaxNumber
298289

299290
self.series = Series(array).astype(dtype)
300-
self.values = np.arange(MaxNumber).astype(dtype)
291+
292+
self.values = np.arange(MaxNumber).astype(dtype.lower())
301293

302294
def time_isin(self, dtypes, MaxNumber, series_type):
303295
self.series.isin(self.values)
@@ -313,16 +305,12 @@ class IsInLongSeriesValuesDominate:
313305
def setup(self, dtype, series_type):
314306
N = 10 ** 7
315307

316-
# https://github.com/pandas-dev/pandas/issues/39844
317-
if not np_version_under1p20 and dtype in ("Int64", "Float64"):
318-
raise NotImplementedError
319-
320308
if series_type == "random":
321309
vals = np.random.randint(0, 10 * N, N)
322310
if series_type == "monotone":
323311
vals = np.arange(N)
324312

325-
self.values = vals.astype(dtype)
313+
self.values = vals.astype(dtype.lower())
326314
M = 10 ** 6 + 1
327315
self.series = Series(np.arange(M)).astype(dtype)
328316

asv_bench/benchmarks/frame_methods.py

+16
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,22 @@ def time_to_html_mixed(self):
232232
self.df2.to_html()
233233

234234

235+
class ToDict:
236+
params = [["dict", "list", "series", "split", "records", "index"]]
237+
param_names = ["orient"]
238+
239+
def setup(self, orient):
240+
data = np.random.randint(0, 1000, size=(10000, 4))
241+
self.int_df = DataFrame(data)
242+
self.datetimelike_df = self.int_df.astype("timedelta64[ns]")
243+
244+
def time_to_dict_ints(self, orient):
245+
self.int_df.to_dict(orient=orient)
246+
247+
def time_to_dict_datetimelike(self, orient):
248+
self.datetimelike_df.to_dict(orient=orient)
249+
250+
235251
class ToNumpy:
236252
def setup(self):
237253
N = 10000

asv_bench/benchmarks/io/csv.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ class ReadCSVFloatPrecision(StringIORewind):
291291

292292
def setup(self, sep, decimal, float_precision):
293293
floats = [
294-
"".join(random.choice(string.digits) for _ in range(28)) for _ in range(15)
294+
"".join([random.choice(string.digits) for _ in range(28)])
295+
for _ in range(15)
295296
]
296297
rows = sep.join([f"0{decimal}" + "{}"] * 3) + "\n"
297298
data = rows * 5
@@ -395,7 +396,7 @@ class ReadCSVCachedParseDates(StringIORewind):
395396
param_names = ["do_cache", "engine"]
396397

397398
def setup(self, do_cache, engine):
398-
data = ("\n".join(f"10/{year}" for year in range(2000, 2100)) + "\n") * 10
399+
data = ("\n".join([f"10/{year}" for year in range(2000, 2100)]) + "\n") * 10
399400
self.StringIO_input = StringIO(data)
400401

401402
def time_read_csv_cached(self, do_cache, engine):

asv_bench/benchmarks/rolling.py

+3
Original file line numberDiff line numberDiff line change
@@ -296,5 +296,8 @@ def time_apply(self, method):
296296
table_method_func, raw=True, engine="numba"
297297
)
298298

299+
def time_ewm_mean(self, method):
300+
self.df.ewm(1, method=method).mean(engine="numba")
301+
299302

300303
from .pandas_vb_common import setup # noqa: F401 isort:skip

azure-pipelines.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ trigger:
33
branches:
44
include:
55
- master
6-
- 1.2.x
76
- 1.3.x
87
paths:
98
exclude:
109
- 'doc/*'
1110

1211
pr:
13-
- master
14-
- 1.2.x
15-
- 1.3.x
12+
autoCancel: true
13+
branches:
14+
include:
15+
- master
16+
- 1.3.x
1617

1718
variables:
1819
PYTEST_WORKERS: auto
@@ -22,14 +23,14 @@ jobs:
2223
- template: ci/azure/posix.yml
2324
parameters:
2425
name: macOS
25-
vmImage: macOS-10.14
26+
vmImage: macOS-10.15
2627

2728
- template: ci/azure/windows.yml
2829
parameters:
2930
name: Windows
30-
vmImage: vs2017-win2016
31+
vmImage: windows-2019
3132

32-
- job: py37_32bit
33+
- job: py38_32bit
3334
pool:
3435
vmImage: ubuntu-18.04
3536

@@ -38,7 +39,7 @@ jobs:
3839
docker pull quay.io/pypa/manylinux2014_i686
3940
docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
4041
/bin/bash -xc "cd pandas && \
41-
/opt/python/cp37-cp37m/bin/python -m venv ~/virtualenvs/pandas-dev && \
42+
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
4243
. ~/virtualenvs/pandas-dev/bin/activate && \
4344
python -m pip install --no-deps -U pip wheel setuptools && \
4445
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
@@ -52,4 +53,4 @@ jobs:
5253
inputs:
5354
testResultsFiles: '**/test-*.xml'
5455
failTaskOnFailedTests: true
55-
testRunTitle: 'Publish test results for Python 3.7-32 bit full Linux'
56+
testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux'

ci/azure/posix.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
strategy:
1010
matrix:
1111
${{ if eq(parameters.name, 'macOS') }}:
12-
py37_macos:
13-
ENV_FILE: ci/deps/azure-macos-37.yaml
14-
CONDA_PY: "37"
12+
py38_macos:
13+
ENV_FILE: ci/deps/azure-macos-38.yaml
14+
CONDA_PY: "38"
1515
PATTERN: "not slow and not network"
1616

1717
steps:

0 commit comments

Comments
 (0)