Skip to content

Commit b39ac7a

Browse files
authored
Merge branch 'main' into tguard
2 parents 75ac7e1 + 1130360 commit b39ac7a

File tree

213 files changed

+4678
-2860
lines changed

Some content is hidden

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

213 files changed

+4678
-2860
lines changed

.github/workflows/32-bit-linux.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
pull_request:
910
branches:
1011
- main
12+
- 2.0.x
1113
- 1.5.x
1214
paths-ignore:
1315
- "doc/**"
@@ -52,3 +54,7 @@ jobs:
5254
name: Test results
5355
path: test-data.xml
5456
if: failure()
57+
concurrency:
58+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
59+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-32bit
60+
cancel-in-progress: true

.github/workflows/code-checks.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
pull_request:
910
branches:
1011
- main
12+
- 2.0.x
1113
- 1.5.x
1214

1315
env:

.github/workflows/docbuild-and-upload.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
tags:
910
- '*'
1011
pull_request:
1112
branches:
1213
- main
14+
- 2.0.x
1315
- 1.5.x
1416

1517
env:

.github/workflows/macos-windows.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
pull_request:
910
branches:
1011
- main
12+
- 2.0.x
1113
- 1.5.x
1214
paths-ignore:
1315
- "doc/**"
16+
- "web/**"
1417

1518
env:
1619
PANDAS_CI: 1
1720
PYTEST_TARGET: pandas
1821
PATTERN: "not slow and not db and not network and not single_cpu"
19-
ERROR_ON_WARNINGS: "1"
20-
2122

2223
permissions:
2324
contents: read

.github/workflows/package-checks.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
pull_request:
910
branches:
1011
- main
12+
- 2.0.x
1113
- 1.5.x
1214
types: [ labeled, opened, synchronize, reopened ]
1315

.github/workflows/python-dev.yml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ on:
3333
- None
3434
paths-ignore:
3535
- "doc/**"
36+
- "web/**"
3637

3738
env:
3839
PYTEST_WORKERS: "auto"

.github/workflows/sdist.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
pull_request:
910
branches:
1011
- main
12+
- 2.0.x
1113
- 1.5.x
1214
types: [labeled, opened, synchronize, reopened]
1315
paths-ignore:
1416
- "doc/**"
17+
- "web/**"
1518

1619
permissions:
1720
contents: read

.github/workflows/ubuntu.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ on:
44
push:
55
branches:
66
- main
7+
- 2.0.x
78
- 1.5.x
89
pull_request:
910
branches:
1011
- main
12+
- 2.0.x
1113
- 1.5.x
1214
paths-ignore:
1315
- "doc/**"
16+
- "web/**"
1417

1518
env:
1619
PANDAS_CI: 1
@@ -38,7 +41,6 @@ jobs:
3841
- name: "Minimum Versions"
3942
env_file: actions-38-minimum_versions.yaml
4043
pattern: "not slow and not network and not single_cpu"
41-
error_on_warnings: "0"
4244
- name: "Locale: it_IT"
4345
env_file: actions-38.yaml
4446
pattern: "not slow and not network and not single_cpu"
@@ -63,12 +65,10 @@ jobs:
6365
env_file: actions-310.yaml
6466
pattern: "not slow and not network and not single_cpu"
6567
pandas_copy_on_write: "1"
66-
error_on_warnings: "0"
6768
- name: "Data Manager"
6869
env_file: actions-38.yaml
6970
pattern: "not slow and not network and not single_cpu"
7071
pandas_data_manager: "array"
71-
error_on_warnings: "0"
7272
- name: "Pypy"
7373
env_file: actions-pypy-38.yaml
7474
pattern: "not slow and not network and not single_cpu"
@@ -77,7 +77,6 @@ jobs:
7777
env_file: actions-310-numpydev.yaml
7878
pattern: "not slow and not network and not single_cpu"
7979
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
80-
error_on_warnings: "0"
8180
exclude:
8281
- env_file: actions-38.yaml
8382
pyarrow_version: "8"
@@ -97,7 +96,6 @@ jobs:
9796
ENV_FILE: ci/deps/${{ matrix.env_file }}
9897
PATTERN: ${{ matrix.pattern }}
9998
EXTRA_APT: ${{ matrix.extra_apt || '' }}
100-
ERROR_ON_WARNINGS: ${{ matrix.error_on_warnings || '1' }}
10199
LANG: ${{ matrix.lang || '' }}
102100
LC_ALL: ${{ matrix.lc_all || '' }}
103101
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}

.github/workflows/wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ jobs:
173173
pip install hypothesis>=6.34.2 pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-asyncio>=0.17
174174
cd .. # Not a good idea to test within the src tree
175175
python -c "import pandas; print(pandas.__version__);
176-
pandas.test(extra_args=['-m not clipboard and not single_cpu', '--skip-slow', '--skip-network', '--skip-db', '-n=2']);
177-
pandas.test(extra_args=['-m not clipboard and single_cpu', '--skip-slow', '--skip-network', '--skip-db'])"
176+
pandas.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '-n 2']);
177+
pandas.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db'])"
178178
- uses: actions/upload-artifact@v3
179179
with:
180180
name: sdist

.pre-commit-config.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ repos:
313313
entry: python scripts/generate_pip_deps_from_conda.py
314314
files: ^(environment.yml|requirements-dev.txt)$
315315
pass_filenames: false
316-
additional_dependencies: [pyyaml, toml]
316+
additional_dependencies: [tomli, pyyaml]
317317
- id: title-capitalization
318318
name: Validate correct capitalization among titles in documentation
319319
entry: python scripts/validate_rst_title_capitalization.py
@@ -391,10 +391,11 @@ repos:
391391
types: [yaml]
392392
- id: validate-min-versions-in-sync
393393
name: Check minimum version of dependencies are aligned
394-
entry: python scripts/validate_min_versions_in_sync.py
394+
entry: python -m scripts.validate_min_versions_in_sync
395395
language: python
396396
files: ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
397-
additional_dependencies: [tomli]
397+
additional_dependencies: [tomli, pyyaml]
398+
pass_filenames: false
398399
- id: validate-errors-locations
399400
name: Validate errors locations
400401
description: Validate errors are in appropriate locations.

asv_bench/benchmarks/frame_methods.py

+71
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@
1717
from .pandas_vb_common import tm
1818

1919

20+
class Clip:
21+
params = [
22+
["float64", "Float64", "float64[pyarrow]"],
23+
]
24+
param_names = ["dtype"]
25+
26+
def setup(self, dtype):
27+
data = np.random.randn(100_000, 10)
28+
df = DataFrame(data, dtype=dtype)
29+
self.df = df
30+
31+
def time_clip(self, dtype):
32+
self.df.clip(-1.0, 1.0)
33+
34+
2035
class GetNumericData:
2136
def setup(self):
2237
self.df = DataFrame(np.random.randn(10000, 25))
@@ -429,6 +444,22 @@ def time_dropna_axis_mixed_dtypes(self, how, axis):
429444
self.df_mixed.dropna(how=how, axis=axis)
430445

431446

447+
class Isna:
448+
params = ["float64", "Float64", "float64[pyarrow]"]
449+
param_names = ["dtype"]
450+
451+
def setup(self, dtype):
452+
data = np.random.randn(10000, 1000)
453+
# all-na columns
454+
data[:, 600:800] = np.nan
455+
# partial-na columns
456+
data[800:1000, 4000:5000] = np.nan
457+
self.df = DataFrame(data, dtype=dtype)
458+
459+
def time_isna(self, dtype):
460+
self.df.isna()
461+
462+
432463
class Count:
433464
params = [0, 1]
434465
param_names = ["axis"]
@@ -739,4 +770,44 @@ def time_memory_usage_object_dtype(self):
739770
self.df2.memory_usage(deep=True)
740771

741772

773+
class Where:
774+
params = (
775+
[True, False],
776+
["float64", "Float64", "float64[pyarrow]"],
777+
)
778+
param_names = ["dtype"]
779+
780+
def setup(self, inplace, dtype):
781+
self.df = DataFrame(np.random.randn(100_000, 10), dtype=dtype)
782+
self.mask = self.df < 0
783+
784+
def time_where(self, inplace, dtype):
785+
self.df.where(self.mask, other=0.0, inplace=inplace)
786+
787+
788+
class FindValidIndex:
789+
param_names = ["dtype"]
790+
params = [
791+
["float", "Float64", "float64[pyarrow]"],
792+
]
793+
794+
def setup(self, dtype):
795+
df = DataFrame(
796+
np.random.randn(100000, 2),
797+
columns=list("AB"),
798+
dtype=dtype,
799+
)
800+
df.iloc[:100, 0] = None
801+
df.iloc[:200, 1] = None
802+
df.iloc[-100:, 0] = None
803+
df.iloc[-200:, 1] = None
804+
self.df = df
805+
806+
def time_first_valid_index(self, dtype):
807+
self.df.first_valid_index()
808+
809+
def time_last_valid_index(self, dtype):
810+
self.df.last_valid_index()
811+
812+
742813
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/code_checks.sh

-27
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,15 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8686
MSG='Partially validate docstrings (EX01)' ; echo $MSG
8787
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01 --ignore_functions \
8888
pandas.Series.index \
89-
pandas.Series.nbytes \
90-
pandas.Series.ndim \
91-
pandas.Series.size \
92-
pandas.Series.T \
9389
pandas.Series.hasnans \
9490
pandas.Series.to_list \
9591
pandas.Series.__iter__ \
9692
pandas.Series.keys \
9793
pandas.Series.item \
9894
pandas.Series.pipe \
99-
pandas.Series.kurt \
100-
pandas.Series.mean \
101-
pandas.Series.median \
10295
pandas.Series.mode \
10396
pandas.Series.sem \
10497
pandas.Series.skew \
105-
pandas.Series.kurtosis \
10698
pandas.Series.is_unique \
10799
pandas.Series.is_monotonic_increasing \
108100
pandas.Series.is_monotonic_decreasing \
@@ -549,10 +541,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
549541
pandas.DataFrame.keys \
550542
pandas.DataFrame.iterrows \
551543
pandas.DataFrame.pipe \
552-
pandas.DataFrame.kurt \
553-
pandas.DataFrame.kurtosis \
554-
pandas.DataFrame.mean \
555-
pandas.DataFrame.median \
556544
pandas.DataFrame.sem \
557545
pandas.DataFrame.skew \
558546
pandas.DataFrame.backfill \
@@ -573,24 +561,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
573561
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \
574562
pandas.DataFrame.plot.line \
575563
pandas.Series.plot.line \
576-
pandas.api.types.infer_dtype \
577564
pandas.api.types.is_datetime64_any_dtype \
578565
pandas.api.types.is_datetime64_ns_dtype \
579566
pandas.api.types.is_datetime64tz_dtype \
580-
pandas.api.types.is_integer_dtype \
581-
pandas.api.types.is_interval_dtype \
582-
pandas.api.types.is_period_dtype \
583-
pandas.api.types.is_signed_integer_dtype \
584-
pandas.api.types.is_sparse \
585-
pandas.api.types.is_string_dtype \
586-
pandas.api.types.is_timedelta64_dtype \
587-
pandas.api.types.is_timedelta64_ns_dtype \
588-
pandas.api.types.is_unsigned_integer_dtype \
589-
pandas.io.formats.style.Styler.concat \
590-
pandas.io.formats.style.Styler.export \
591-
pandas.io.formats.style.Styler.set_td_classes \
592-
pandas.io.formats.style.Styler.use \
593-
pandas.io.json.build_table_schema \
594567
pandas.plotting.andrews_curves \
595568
pandas.plotting.autocorrelation_plot \
596569
pandas.plotting.lag_plot \

ci/deps/actions-310-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- pytest-cov
1313
- pytest-xdist>=2.2.0
1414
- hypothesis>=6.34.2
15-
- pytest-asyncio>=0.17
15+
- pytest-asyncio>=0.17.0
1616

1717
# pandas dependencies
1818
- python-dateutil

0 commit comments

Comments
 (0)