Skip to content

Commit 705ff81

Browse files
author
Sylvain MARIE
committed
Merge branch 'main' of https://github.com/pandas-dev/pandas into feature/44764_perf_issue_new_period
2 parents a69aeca + 920c025 commit 705ff81

File tree

182 files changed

+3875
-2460
lines changed

Some content is hidden

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

182 files changed

+3875
-2460
lines changed

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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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/**"
@@ -16,8 +18,6 @@ env:
1618
PANDAS_CI: 1
1719
PYTEST_TARGET: pandas
1820
PATTERN: "not slow and not db and not network and not single_cpu"
19-
ERROR_ON_WARNINGS: "1"
20-
2121

2222
permissions:
2323
contents: read

.github/workflows/package-checks.yml

Lines changed: 2 additions & 0 deletions
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/sdist.yml

Lines changed: 2 additions & 0 deletions
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
paths-ignore:

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 5 deletions
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/**"
@@ -38,7 +40,6 @@ jobs:
3840
- name: "Minimum Versions"
3941
env_file: actions-38-minimum_versions.yaml
4042
pattern: "not slow and not network and not single_cpu"
41-
error_on_warnings: "0"
4243
- name: "Locale: it_IT"
4344
env_file: actions-38.yaml
4445
pattern: "not slow and not network and not single_cpu"
@@ -63,12 +64,10 @@ jobs:
6364
env_file: actions-310.yaml
6465
pattern: "not slow and not network and not single_cpu"
6566
pandas_copy_on_write: "1"
66-
error_on_warnings: "0"
6767
- name: "Data Manager"
6868
env_file: actions-38.yaml
6969
pattern: "not slow and not network and not single_cpu"
7070
pandas_data_manager: "array"
71-
error_on_warnings: "0"
7271
- name: "Pypy"
7372
env_file: actions-pypy-38.yaml
7473
pattern: "not slow and not network and not single_cpu"
@@ -77,7 +76,6 @@ jobs:
7776
env_file: actions-310-numpydev.yaml
7877
pattern: "not slow and not network and not single_cpu"
7978
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
80-
error_on_warnings: "0"
8179
exclude:
8280
- env_file: actions-38.yaml
8381
pyarrow_version: "8"
@@ -97,7 +95,6 @@ jobs:
9795
ENV_FILE: ci/deps/${{ matrix.env_file }}
9896
PATTERN: ${{ matrix.pattern }}
9997
EXTRA_APT: ${{ matrix.extra_apt || '' }}
100-
ERROR_ON_WARNINGS: ${{ matrix.error_on_warnings || '1' }}
10198
LANG: ${{ matrix.lang || '' }}
10299
LC_ALL: ${{ matrix.lc_all || '' }}
103100
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 40 additions & 0 deletions
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))
@@ -739,4 +754,29 @@ def time_memory_usage_object_dtype(self):
739754
self.df2.memory_usage(deep=True)
740755

741756

757+
class FindValidIndex:
758+
param_names = ["dtype"]
759+
params = [
760+
["float", "Float64", "float64[pyarrow]"],
761+
]
762+
763+
def setup(self, dtype):
764+
df = DataFrame(
765+
np.random.randn(100000, 2),
766+
columns=list("AB"),
767+
dtype=dtype,
768+
)
769+
df.iloc[:100, 0] = None
770+
df.iloc[:200, 1] = None
771+
df.iloc[-100:, 0] = None
772+
df.iloc[-200:, 1] = None
773+
self.df = df
774+
775+
def time_first_valid_index(self, dtype):
776+
self.df.first_valid_index()
777+
778+
def time_last_valid_index(self, dtype):
779+
self.df.last_valid_index()
780+
781+
742782
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/code_checks.sh

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +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 \
94-
pandas.Series.to_timestamp \
9590
pandas.Series.to_list \
9691
pandas.Series.__iter__ \
9792
pandas.Series.keys \
9893
pandas.Series.item \
9994
pandas.Series.pipe \
100-
pandas.Series.kurt \
101-
pandas.Series.mean \
102-
pandas.Series.median \
10395
pandas.Series.mode \
10496
pandas.Series.sem \
10597
pandas.Series.skew \
106-
pandas.Series.kurtosis \
10798
pandas.Series.is_unique \
10899
pandas.Series.is_monotonic_increasing \
109100
pandas.Series.is_monotonic_decreasing \
@@ -218,7 +209,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
218209
pandas.Period.year \
219210
pandas.Period.asfreq \
220211
pandas.Period.now \
221-
pandas.Period.to_timestamp \
222212
pandas.arrays.PeriodArray \
223213
pandas.Interval.closed \
224214
pandas.Interval.left \
@@ -551,18 +541,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
551541
pandas.DataFrame.keys \
552542
pandas.DataFrame.iterrows \
553543
pandas.DataFrame.pipe \
554-
pandas.DataFrame.kurt \
555-
pandas.DataFrame.kurtosis \
556-
pandas.DataFrame.mean \
557-
pandas.DataFrame.median \
558544
pandas.DataFrame.sem \
559545
pandas.DataFrame.skew \
560546
pandas.DataFrame.backfill \
561547
pandas.DataFrame.pad \
562548
pandas.DataFrame.swapaxes \
563549
pandas.DataFrame.first_valid_index \
564550
pandas.DataFrame.last_valid_index \
565-
pandas.DataFrame.to_timestamp \
566551
pandas.DataFrame.attrs \
567552
pandas.DataFrame.plot \
568553
pandas.DataFrame.sparse.density \
@@ -576,24 +561,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
576561
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \
577562
pandas.DataFrame.plot.line \
578563
pandas.Series.plot.line \
579-
pandas.api.types.infer_dtype \
580564
pandas.api.types.is_datetime64_any_dtype \
581565
pandas.api.types.is_datetime64_ns_dtype \
582566
pandas.api.types.is_datetime64tz_dtype \
583-
pandas.api.types.is_integer_dtype \
584-
pandas.api.types.is_interval_dtype \
585-
pandas.api.types.is_period_dtype \
586-
pandas.api.types.is_signed_integer_dtype \
587-
pandas.api.types.is_sparse \
588-
pandas.api.types.is_string_dtype \
589-
pandas.api.types.is_timedelta64_dtype \
590-
pandas.api.types.is_timedelta64_ns_dtype \
591-
pandas.api.types.is_unsigned_integer_dtype \
592-
pandas.io.formats.style.Styler.concat \
593-
pandas.io.formats.style.Styler.export \
594-
pandas.io.formats.style.Styler.set_td_classes \
595-
pandas.io.formats.style.Styler.use \
596-
pandas.io.json.build_table_schema \
597567
pandas.plotting.andrews_curves \
598568
pandas.plotting.autocorrelation_plot \
599569
pandas.plotting.lag_plot \

ci/deps/actions-310-numpydev.yaml

Lines changed: 1 addition & 1 deletion
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

ci/deps/actions-310.yaml

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- psutil
16-
- pytest-asyncio>=0.17
15+
- pytest-asyncio>=0.17.0
1716
- boto3
1817

1918
# required dependencies
@@ -22,36 +21,36 @@ dependencies:
2221
- pytz
2322

2423
# optional dependencies
25-
- beautifulsoup4
24+
- beautifulsoup4>=4.9.3
2625
- blosc
27-
- bottleneck
28-
- brotlipy
29-
- fastparquet
30-
- fsspec
31-
- html5lib
32-
- hypothesis
33-
- gcsfs
34-
- jinja2
35-
- lxml
26+
- bottleneck>=1.3.2
27+
- brotlipy>=0.7.0
28+
- fastparquet>=0.6.3
29+
- fsspec>=2021.07.0
30+
- html5lib>=1.1
31+
- hypothesis>=6.34.2
32+
- gcsfs>=2021.07.0
33+
- jinja2>=3.0.0
34+
- lxml>=4.6.3
3635
- matplotlib>=3.6.1, <3.7.0
37-
- numba
38-
- numexpr
39-
- openpyxl<3.1.1
40-
- odfpy
41-
- pandas-gbq
42-
- psycopg2
43-
- pymysql
44-
- pytables
36+
- numba>=0.53.1
37+
- numexpr>=2.7.3
38+
- openpyxl<3.1.1, >=3.0.7
39+
- odfpy>=1.4.1
40+
- pandas-gbq>=0.15.0
41+
- psycopg2>=2.8.6
42+
- pymysql>=1.0.2
43+
- pytables>=3.6.1
4544
- pyarrow
46-
- pyreadstat
47-
- python-snappy
48-
- pyxlsb
45+
- pyreadstat>=1.1.2
46+
- python-snappy>=0.6.0
47+
- pyxlsb>=1.0.8
4948
- s3fs>=2021.08.0
50-
- scipy
51-
- sqlalchemy
52-
- tabulate
49+
- scipy>=1.7.1
50+
- sqlalchemy>=1.4.16
51+
- tabulate>=0.8.9
5352
- tzdata>=2022a
54-
- xarray
55-
- xlrd
56-
- xlsxwriter
57-
- zstandard
53+
- xarray>=0.21.0
54+
- xlrd>=2.0.1
55+
- xlsxwriter>=1.4.3
56+
- zstandard>=0.15.2

0 commit comments

Comments
 (0)