Skip to content

Commit deeaf41

Browse files
committed
Resolve conflicts with master
2 parents ff8fd9b + 34fb225 commit deeaf41

File tree

327 files changed

+5154
-3858
lines changed

Some content is hidden

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

327 files changed

+5154
-3858
lines changed

.github/workflows/ci.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78
branches:
89
- master
910
- 1.2.x
11+
- 1.3.x
1012

1113
env:
1214
ENV_FILE: environment.yml
@@ -20,6 +22,10 @@ jobs:
2022
run:
2123
shell: bash -l {0}
2224

25+
concurrency:
26+
group: ${{ github.ref }}-checks
27+
cancel-in-progress: true
28+
2329
steps:
2430
- name: Checkout
2531
uses: actions/checkout@v2
@@ -93,8 +99,12 @@ jobs:
9399
web_and_docs:
94100
name: Web and docs
95101
runs-on: ubuntu-latest
96-
steps:
97102

103+
concurrency:
104+
group: ${{ github.ref }}-web-docs
105+
cancel-in-progress: true
106+
107+
steps:
98108
- name: Checkout
99109
uses: actions/checkout@v2
100110
with:
@@ -148,8 +158,11 @@ jobs:
148158
strategy:
149159
matrix:
150160
pattern: ["not slow and not network and not clipboard", "slow"]
151-
steps:
161+
concurrency:
162+
group: ${{ github.ref }}-data_manager-${{ matrix.pattern }}
163+
cancel-in-progress: true
152164

165+
steps:
153166
- name: Checkout
154167
uses: actions/checkout@v2
155168
with:

.github/workflows/database.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ name: Database
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78
branches:
89
- master
910
- 1.2.x
11+
- 1.3.x
12+
paths-ignore:
13+
- "doc/**"
1014

1115
env:
1216
PYTEST_WORKERS: "auto"
@@ -26,6 +30,10 @@ jobs:
2630
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
2731
fail-fast: false
2832

33+
concurrency:
34+
group: ${{ github.ref }}-${{ matrix.ENV_FILE }}
35+
cancel-in-progress: true
36+
2937
services:
3038
mysql:
3139
image: mysql

.github/workflows/posix.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ name: Posix
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78
branches:
89
- master
910
- 1.2.x
11+
- 1.3.x
12+
paths-ignore:
13+
- "doc/**"
1014

1115
env:
1216
PYTEST_WORKERS: "auto"
@@ -41,6 +45,9 @@ jobs:
4145
LC_ALL: ${{ matrix.settings[4] }}
4246
PANDAS_TESTING_MODE: ${{ matrix.settings[5] }}
4347
TEST_ARGS: ${{ matrix.settings[6] }}
48+
concurrency:
49+
group: ${{ github.ref }}-${{ matrix.settings[0] }}
50+
cancel-in-progress: true
4451

4552
steps:
4653
- name: Checkout

.github/workflows/pre-commit.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ name: pre-commit
33
on:
44
pull_request:
55
push:
6-
branches: [master]
6+
branches:
7+
- master
78

89
jobs:
910
pre-commit:
1011
runs-on: ubuntu-latest
12+
concurrency:
13+
group: ${{ github.ref }}-pre-commit
14+
cancel-in-progress: true
1115
steps:
1216
- uses: actions/checkout@v2
1317
- uses: actions/setup-python@v2

.github/workflows/python-dev.yml

+6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ on:
77
pull_request:
88
branches:
99
- master
10+
paths-ignore:
11+
- "doc/**"
1012

1113
jobs:
1214
build:
1315
runs-on: ubuntu-latest
1416
name: actions-310-dev
1517
timeout-minutes: 60
1618

19+
concurrency:
20+
group: ${{ github.ref }}-dev
21+
cancel-in-progress: true
22+
1723
steps:
1824
- uses: actions/checkout@v2
1925
with:

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: absolufy-imports
1010
files: ^pandas/
1111
- repo: https://github.com/python/black
12-
rev: 20.8b1
12+
rev: 21.5b2
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/codespell-project/codespell

MANIFEST.in

+13-2
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

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3509134.svg)](https://doi.org/10.5281/zenodo.3509134)
1111
[![Package Status](https://img.shields.io/pypi/status/pandas.svg)](https://pypi.org/project/pandas/)
1212
[![License](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/master/LICENSE)
13-
[![Travis Build Status](https://travis-ci.org/pandas-dev/pandas.svg?branch=master)](https://travis-ci.org/pandas-dev/pandas)
1413
[![Azure Build Status](https://dev.azure.com/pandas-dev/pandas/_apis/build/status/pandas-dev.pandas?branch=master)](https://dev.azure.com/pandas-dev/pandas/_build/latest?definitionId=1&branch=master)
1514
[![Coverage](https://codecov.io/github/pandas-dev/pandas/coverage.svg?branch=master)](https://codecov.io/gh/pandas-dev/pandas)
1615
[![Downloads](https://anaconda.org/conda-forge/pandas/badges/downloads.svg)](https://pandas.pydata.org)
1716
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pydata/pandas)
1817
[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)
1918
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
19+
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
2020

2121
## What is it?
2222

@@ -101,8 +101,8 @@ pip install pandas
101101

102102
## Dependencies
103103
- [NumPy - Adds support for large, multi-dimensional arrays, matrices and high-level mathematical functions to operate on these arrays](https://www.numpy.org)
104-
- [python-dateutil - Provides powerful extensions to the standard datetime module](https://labix.org/python-dateutil)
105-
- [pytz - Brings the Olson tz database into Python which allows accurate and cross platform timezone calculations](https://pythonhosted.org/pytz)
104+
- [python-dateutil - Provides powerful extensions to the standard datetime module](https://dateutil.readthedocs.io/en/stable/index.html)
105+
- [pytz - Brings the Olson tz database into Python which allows accurate and cross platform timezone calculations](https://github.com/stub42/pytz)
106106

107107
See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies) for minimum supported versions of required, recommended and optional dependencies.
108108

@@ -121,7 +121,7 @@ cloning the git repo), execute:
121121
python setup.py install
122122
```
123123

124-
or for installing in [development mode](https://pip.pypa.io/en/latest/reference/pip_install.html#editable-installs):
124+
or for installing in [development mode](https://pip.pypa.io/en/latest/cli/pip_install/#install-editable):
125125

126126

127127
```sh

asv_bench/benchmarks/algorithms.py

+10-13
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,38 @@ class Factorize:
2323
"int",
2424
"uint",
2525
"float",
26-
"string",
26+
"object",
2727
"datetime64[ns]",
2828
"datetime64[ns, tz]",
2929
"Int64",
3030
"boolean",
31-
"string_arrow",
31+
"string[pyarrow]",
3232
],
3333
]
3434
param_names = ["unique", "sort", "dtype"]
3535

3636
def setup(self, unique, sort, dtype):
3737
N = 10 ** 5
3838
string_index = tm.makeStringIndex(N)
39-
try:
40-
from pandas.core.arrays.string_arrow import ArrowStringDtype
41-
42-
string_arrow = pd.array(string_index, dtype=ArrowStringDtype())
43-
except ImportError:
44-
string_arrow = None
45-
46-
if dtype == "string_arrow" and not string_arrow:
47-
raise NotImplementedError
39+
string_arrow = None
40+
if dtype == "string[pyarrow]":
41+
try:
42+
string_arrow = pd.array(string_index, dtype="string[pyarrow]")
43+
except ImportError:
44+
raise NotImplementedError
4845

4946
data = {
5047
"int": pd.Int64Index(np.arange(N)),
5148
"uint": pd.UInt64Index(np.arange(N)),
5249
"float": pd.Float64Index(np.random.randn(N)),
53-
"string": string_index,
50+
"object": string_index,
5451
"datetime64[ns]": pd.date_range("2011-01-01", freq="H", periods=N),
5552
"datetime64[ns, tz]": pd.date_range(
5653
"2011-01-01", freq="H", periods=N, tz="Asia/Tokyo"
5754
),
5855
"Int64": pd.array(np.arange(N), dtype="Int64"),
5956
"boolean": pd.array(np.random.randint(0, 2, N), dtype="boolean"),
60-
"string_arrow": string_arrow,
57+
"string[pyarrow]": string_arrow,
6158
}[dtype]
6259
if not unique:
6360
data = data.repeat(5)

asv_bench/benchmarks/algos/isin.py

+3-13
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class IsIn:
2525
"category[object]",
2626
"category[int]",
2727
"str",
28-
"string",
29-
"arrow_string",
28+
"string[python]",
29+
"string[pyarrow]",
3030
]
3131
param_names = ["dtype"]
3232

@@ -50,8 +50,6 @@ def setup(self, dtype):
5050

5151
elif dtype in ["category[object]", "category[int]"]:
5252
# Note: sizes are different in this case than others
53-
np.random.seed(1234)
54-
5553
n = 5 * 10 ** 5
5654
sample_size = 100
5755

@@ -62,9 +60,7 @@ def setup(self, dtype):
6260
self.values = np.random.choice(arr, sample_size)
6361
self.series = Series(arr).astype("category")
6462

65-
elif dtype in ["str", "string", "arrow_string"]:
66-
from pandas.core.arrays.string_arrow import ArrowStringDtype # noqa: F401
67-
63+
elif dtype in ["str", "string[python]", "string[pyarrow]"]:
6864
try:
6965
self.series = Series(tm.makeStringIndex(N), dtype=dtype)
7066
except ImportError:
@@ -101,7 +97,6 @@ class IsinAlmostFullWithRandomInt:
10197
def setup(self, dtype, exponent, title):
10298
M = 3 * 2 ** (exponent - 2)
10399
# 0.77-the maximal share of occupied buckets
104-
np.random.seed(42)
105100
self.series = Series(np.random.randint(0, M, M)).astype(dtype)
106101

107102
values = np.random.randint(0, M, M).astype(dtype)
@@ -134,7 +129,6 @@ class IsinWithRandomFloat:
134129
param_names = ["dtype", "size", "title"]
135130

136131
def setup(self, dtype, size, title):
137-
np.random.seed(42)
138132
self.values = np.random.rand(size)
139133
self.series = Series(self.values).astype(dtype)
140134
np.random.shuffle(self.values)
@@ -181,7 +175,6 @@ class IsinWithArange:
181175

182176
def setup(self, dtype, M, offset_factor):
183177
offset = int(M * offset_factor)
184-
np.random.seed(42)
185178
tmp = Series(np.random.randint(offset, M + offset, 10 ** 6))
186179
self.series = tmp.astype(dtype)
187180
self.values = np.arange(M).astype(dtype)
@@ -292,10 +285,8 @@ def setup(self, dtype, MaxNumber, series_type):
292285
raise NotImplementedError
293286

294287
if series_type == "random_hits":
295-
np.random.seed(42)
296288
array = np.random.randint(0, MaxNumber, N)
297289
if series_type == "random_misses":
298-
np.random.seed(42)
299290
array = np.random.randint(0, MaxNumber, N) + MaxNumber
300291
if series_type == "monotone_hits":
301292
array = np.repeat(np.arange(MaxNumber), N // MaxNumber)
@@ -324,7 +315,6 @@ def setup(self, dtype, series_type):
324315
raise NotImplementedError
325316

326317
if series_type == "random":
327-
np.random.seed(42)
328318
vals = np.random.randint(0, 10 * N, N)
329319
if series_type == "monotone":
330320
vals = np.arange(N)

asv_bench/benchmarks/frame_ctor.py

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class FromDictwithTimestamp:
6767

6868
def setup(self, offset):
6969
N = 10 ** 3
70-
np.random.seed(1234)
7170
idx = date_range(Timestamp("1/1/1900"), freq=offset, periods=N)
7271
df = DataFrame(np.random.randn(N, 10), index=idx)
7372
self.d = df.to_dict()

asv_bench/benchmarks/groupby.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class GroupByMethods:
393393

394394
param_names = ["dtype", "method", "application"]
395395
params = [
396-
["int", "float", "object", "datetime"],
396+
["int", "float", "object", "datetime", "uint"],
397397
[
398398
"all",
399399
"any",
@@ -442,6 +442,8 @@ def setup(self, dtype, method, application):
442442
values = rng.take(np.random.randint(0, ngroups, size=size))
443443
if dtype == "int":
444444
key = np.random.randint(0, size, size=size)
445+
elif dtype == "uint":
446+
key = np.random.randint(0, size, size=size, dtype=dtype)
445447
elif dtype == "float":
446448
key = np.concatenate(
447449
[np.random.random(ngroups) * 0.1, np.random.random(ngroups) * 10.0]
@@ -505,11 +507,11 @@ def time_frame_agg(self, dtype, method):
505507
self.df.groupby("key").agg(method)
506508

507509

508-
class CumminMax:
510+
class Cumulative:
509511
param_names = ["dtype", "method"]
510512
params = [
511513
["float64", "int64", "Float64", "Int64"],
512-
["cummin", "cummax"],
514+
["cummin", "cummax", "cumsum"],
513515
]
514516

515517
def setup(self, dtype, method):

0 commit comments

Comments
 (0)