Skip to content

Commit 84861d2

Browse files
Merge branch 'test_numpy_complex' of https://github.com/MichaelTiemannOSC/pandas into test_numpy_complex
2 parents ca52a84 + f88e280 commit 84861d2

File tree

325 files changed

+4070
-3232
lines changed

Some content is hidden

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

325 files changed

+4070
-3232
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
fi
4747
- run:
4848
name: Build aarch64 wheels
49+
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
4950
command: |
5051
pip3 install cibuildwheel==2.14.1
5152
cibuildwheel --prerelease-pythons --output-dir wheelhouse

.github/workflows/code-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.0.x
7+
- 2.1.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.0.x
11+
- 2.1.x
1212

1313
env:
1414
ENV_FILE: environment.yml

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.0.x
7+
- 2.1.x
88
tags:
99
- '*'
1010
pull_request:
1111
branches:
1212
- main
13-
- 2.0.x
13+
- 2.1.x
1414

1515
env:
1616
ENV_FILE: environment.yml

.github/workflows/package-checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.0.x
7+
- 2.1.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.0.x
11+
- 2.1.x
1212
types: [ labeled, opened, synchronize, reopened ]
1313

1414
permissions:
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-22.04
2525
strategy:
2626
matrix:
27-
extra: ["test", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "all"]
27+
extra: ["test", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "consortium-standard", "all"]
2828
fail-fast: false
2929
name: Install Extras - ${{ matrix.extra }}
3030
concurrency:

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.0.x
7+
- 2.1.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.0.x
11+
- 2.1.x
1212
paths-ignore:
1313
- "doc/**"
1414
- "web/**"

.github/workflows/wheels.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
build_sdist:
3636
name: Build sdist
3737
if: >-
38-
(github.event_name == 'schedule' && github.repository_owner == 'pandas-dev') ||
38+
(github.event_name == 'schedule') ||
3939
github.event_name == 'workflow_dispatch' ||
4040
(github.event_name == 'pull_request' &&
4141
contains(github.event.pull_request.labels.*.name, 'Build')) ||
@@ -67,6 +67,10 @@ jobs:
6767
name: sdist
6868
path: ./dist/*
6969

70+
- name: Sanity check sdist files
71+
run: |
72+
ls ./dist
73+
7074
- name: Output sdist name
7175
id: save-path
7276
shell: bash -el {0}
@@ -76,7 +80,7 @@ jobs:
7680
needs: build_sdist
7781
name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
7882
if: >-
79-
(github.event_name == 'schedule' && github.repository_owner == 'pandas-dev') ||
83+
(github.event_name == 'schedule') ||
8084
github.event_name == 'workflow_dispatch' ||
8185
(github.event_name == 'pull_request' &&
8286
contains(github.event.pull_request.labels.*.name, 'Build')) ||
@@ -111,33 +115,31 @@ jobs:
111115
# We need to build wheels from the sdist since the sdist
112116
# removes unnecessary files from the release
113117
- name: Download sdist (not macOS)
114-
if: ${{ matrix.buildplat[1] != 'macosx_*' }}
118+
#if: ${{ matrix.buildplat[1] != 'macosx_*' }}
115119
uses: actions/download-artifact@v3
116120
with:
117121
name: sdist
118122
path: ./dist
119123

120-
- name: Set up Python (macOS)
121-
if: ${{ matrix.buildplat[1] == 'macosx_*' }}
122-
uses: actions/setup-python@v4
123-
with:
124-
python-version: '3.11'
124+
- name: Output sdist name (macOS)
125+
id: save-path
126+
shell: bash -el {0}
127+
run: echo "sdist_name=$(ls ./dist)" >> "$GITHUB_ENV"
125128

126129
# Python version used to build sdist doesn't matter
127130
# wheel will be built from sdist with the correct version
128-
- name: Build sdist (macOS)
131+
- name: Unzip sdist (macOS)
129132
if: ${{ matrix.buildplat[1] == 'macosx_*' }}
130133
run: |
131-
python -m pip install build
132-
python -m build --sdist
134+
tar -xzf ./dist/${{ env.sdist_name }} -C ./dist
133135
134136
- name: Output sdist name (macOS)
135-
id: save-path
137+
id: save-path2
136138
shell: bash -el {0}
137-
run: echo "sdist_name=$(ls ./dist)" >> "$GITHUB_ENV"
139+
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
138140

139141
- name: Build wheels
140-
uses: pypa/cibuildwheel@v2.14.1
142+
uses: pypa/cibuildwheel@v2.15.0
141143
with:
142144
package-dir: ./dist/${{ matrix.buildplat[1] == 'macosx_*' && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
143145
env:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ ci:
2020
repos:
2121
- repo: https://github.com/hauntsaninja/black-pre-commit-mirror
2222
# black compiled with mypyc
23-
rev: 23.3.0
23+
rev: 23.7.0
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.0.277
27+
rev: v0.0.284
2828
hooks:
2929
- id: ruff
3030
args: [--exit-non-zero-on-fix]
@@ -107,7 +107,7 @@ repos:
107107
hooks:
108108
- id: isort
109109
- repo: https://github.com/asottile/pyupgrade
110-
rev: v3.7.0
110+
rev: v3.10.1
111111
hooks:
112112
- id: pyupgrade
113113
args: [--py39-plus]
@@ -138,7 +138,7 @@ repos:
138138
types: [python]
139139
stages: [manual]
140140
additional_dependencies: &pyright_dependencies
141-
- pyright@1.1.305
141+
- pyright@1.1.318
142142
- id: pyright
143143
# note: assumes python env is setup and activated
144144
name: pyright reportGeneralTypeIssues

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// pip (with all the conda available packages installed first,
4242
// followed by the pip installed packages).
4343
"matrix": {
44-
"Cython": ["3.0.0"],
44+
"Cython": ["0.29.33"],
4545
"matplotlib": [],
4646
"sqlalchemy": [],
4747
"scipy": [],

asv_bench/benchmarks/algos/isin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def setup(self, series_type, vals_type):
247247
elif series_type == "long":
248248
ser_vals = np.arange(N_many)
249249
elif series_type == "long_floats":
250-
ser_vals = np.arange(N_many, dtype=np.float_)
250+
ser_vals = np.arange(N_many, dtype=np.float64)
251251

252252
self.series = Series(ser_vals).astype(object)
253253

@@ -258,7 +258,7 @@ def setup(self, series_type, vals_type):
258258
elif vals_type == "long":
259259
values = np.arange(N_many)
260260
elif vals_type == "long_floats":
261-
values = np.arange(N_many, dtype=np.float_)
261+
values = np.arange(N_many, dtype=np.float64)
262262

263263
self.values = values.astype(object)
264264

asv_bench/benchmarks/groupby.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,8 @@ class GroupByCythonAgg:
586586
[
587587
"sum",
588588
"prod",
589-
# TODO: uncomment min/max
590-
# Currently, min/max implemented very inefficiently
591-
# because it re-uses the Window min/max kernel
592-
# so it will time out ASVs
593-
# "min",
594-
# "max",
589+
"min",
590+
"max",
595591
"mean",
596592
"median",
597593
"var",

ci/deps/actions-310.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=3.0.0
9+
- cython>=0.29.33
1010
- meson[ninja]=1.0.1
1111
- meson-python=0.13.1
1212

ci/deps/actions-311-downstream_compat.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# build dependencies
99
- versioneer[toml]
10-
- cython>=3.0.0
10+
- cython>=0.29.33
1111
- meson[ninja]=1.0.1
1212
- meson-python=0.13.1
1313

@@ -73,5 +73,6 @@ dependencies:
7373
- pyyaml
7474
- py
7575
- pip:
76+
- dataframe-api-compat>=0.1.7
7677
- pyqt5>=5.15.6
7778
- tzdata>=2022.1

ci/deps/actions-311-pyarrownightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77
# build dependencies
88
- versioneer[toml]
99
- meson[ninja]=1.0.1
10-
- cython>=3.0.0
10+
- cython>=0.29.33
1111
- meson-python=0.13.1
1212

1313
# test dependencies

ci/deps/actions-311.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=3.0.0
9+
- cython>=0.29.33
1010
- meson[ninja]=1.0.1
1111
- meson-python=0.13.1
1212

ci/deps/actions-39-minimum_versions.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88

99
# build dependencies
1010
- versioneer[toml]
11-
- cython>=3.0.0
11+
- cython>=0.29.33
1212
- meson[ninja]=1.0.1
1313
- meson-python=0.13.1
1414

@@ -61,5 +61,6 @@ dependencies:
6161
- zstandard=0.17.0
6262

6363
- pip:
64+
- dataframe-api-compat==0.1.7
6465
- pyqt5==5.15.6
6566
- tzdata==2022.1

ci/deps/actions-39.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=3.0.0
9+
- cython>=0.29.33
1010
- meson[ninja]=1.0.1
1111
- meson-python=0.13.1
1212

ci/deps/actions-pypy-39.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99

1010
# build dependencies
1111
- versioneer[toml]
12-
- cython>=3.0.0
12+
- cython>=0.29.33
1313
- meson[ninja]=1.0.1
1414
- meson-python=0.13.1
1515

ci/deps/circle-310-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=3.0.0
9+
- cython>=0.29.33
1010
- meson[ninja]=1.0.1
1111
- meson-python=0.13.1
1212

ci/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ echo PYTHONHASHSEED=$PYTHONHASHSEED
1010

1111
COVERAGE="-s --cov=pandas --cov-report=xml --cov-append --cov-config=pyproject.toml"
1212

13-
PYTEST_CMD="MESONPY_EDITABLE_VERBOSE=1 pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
13+
PYTEST_CMD="MESONPY_EDITABLE_VERBOSE=1 PYTHONDEVMODE=1 PYTHONWARNDEFAULTENCODING=1 pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
1414

1515
if [[ "$PATTERN" ]]; then
1616
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""

doc/source/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@
240240
"footer_start": ["pandas_footer", "sphinx-version"],
241241
"github_url": "https://github.com/pandas-dev/pandas",
242242
"twitter_url": "https://twitter.com/pandas_dev",
243-
"analytics": {"google_analytics_id": "G-5RE31C1RNW"},
243+
"analytics": {
244+
"plausible_analytics_domain": "pandas.pydata.org",
245+
"plausible_analytics_url": "https://views.scientific-python.org/js/script.js",
246+
},
244247
"logo": {"image_dark": "https://pandas.pydata.org/static/img/pandas_white.svg"},
245248
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
246249
"switcher": {

doc/source/getting_started/comparison/comparison_with_sql.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ methods.
107107
.. ipython:: python
108108
109109
frame = pd.DataFrame(
110-
{"col1": ["A", "B", np.NaN, "C", "D"], "col2": ["F", np.NaN, "G", "H", "I"]}
110+
{"col1": ["A", "B", np.nan, "C", "D"], "col2": ["F", np.nan, "G", "H", "I"]}
111111
)
112112
frame
113113

doc/source/getting_started/install.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ Package Minimum support
206206
`NumPy <https://numpy.org>`__ 1.22.4
207207
`python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ 2.8.2
208208
`pytz <https://pypi.org/project/pytz/>`__ 2020.1
209+
`tzdata <https://pypi.org/project/tzdata/>`__ 2022.1
209210
================================================================ ==========================
210211

211212
.. _install.optional_dependencies:
@@ -415,3 +416,14 @@ brotli 0.7.0 compression Brotli compression
415416
python-snappy 0.6.1 compression Snappy compression
416417
Zstandard 0.17.0 compression Zstandard compression
417418
========================= ================== =============== =============================================================
419+
420+
Consortium Standard
421+
^^^^^^^^^^^^^^^^^^^
422+
423+
Installable with ``pip install "pandas[consortium-standard]"``
424+
425+
========================= ================== =================== =============================================================
426+
Dependency Minimum Version pip extra Notes
427+
========================= ================== =================== =============================================================
428+
dataframe-api-compat 0.1.7 consortium-standard Consortium Standard-compatible implementation based on pandas
429+
========================= ================== =================== =============================================================

doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ For more information about :meth:`~DataFrame.pivot_table`, see the user guide se
273273
<div class="d-flex flex-row gs-torefguide">
274274
<span class="badge badge-info">To user guide</span>
275275

276-
Have a look at :meth:`~DataFrame.groupby` in combination with :meth:`~DataFrame.unstack` at the user guide section on :ref:`combining stats and groupby <reshaping.combine_with_groupby>`.
277-
278276
.. raw:: html
279277

280278
</div>

doc/source/reference/series.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ Datetime properties
314314
Series.dt.weekday
315315
Series.dt.dayofyear
316316
Series.dt.day_of_year
317+
Series.dt.days_in_month
317318
Series.dt.quarter
318319
Series.dt.is_month_start
319320
Series.dt.is_month_end
@@ -327,6 +328,7 @@ Datetime properties
327328
Series.dt.tz
328329
Series.dt.freq
329330
Series.dt.unit
331+
Series.dt.normalize
330332

331333
Datetime methods
332334
^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)