Skip to content

Commit eb8799b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into clean/plotting/testing3
2 parents cb413e8 + 4526ea7 commit eb8799b

34 files changed

+780
-539
lines changed

.circleci/config.yml

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,64 @@
11
version: 2.1
22

33
jobs:
4-
test-arm:
4+
test-linux-arm:
55
machine:
66
image: default
77
resource_class: arm.large
88
environment:
9-
ENV_FILE: ci/deps/circle-310-arm64.yaml
9+
ENV_FILE: ci/deps/circle-311-arm64.yaml
1010
PYTEST_WORKERS: auto
1111
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
1212
PYTEST_TARGET: "pandas"
1313
PANDAS_CI: "1"
1414
steps:
1515
- checkout
16-
- run: .circleci/setup_env.sh
17-
- run: >
18-
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
19-
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
20-
ci/run_tests.sh
21-
linux-musl:
16+
- run:
17+
name: Install Environment and Run Tests
18+
shell: /bin/bash -exuo pipefail
19+
command: |
20+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh"
21+
wget -q $MAMBA_URL -O minimamba.sh
22+
chmod +x minimamba.sh
23+
MAMBA_DIR="$HOME/miniconda3"
24+
rm -rf $MAMBA_DIR
25+
./minimamba.sh -b -p $MAMBA_DIR
26+
export PATH=$MAMBA_DIR/bin:$PATH
27+
conda info -a
28+
conda env create -q -n pandas-dev -f $ENV_FILE
29+
conda list -n pandas-dev
30+
source activate pandas-dev
31+
if pip show pandas 1>/dev/null; then
32+
pip uninstall -y pandas
33+
fi
34+
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
35+
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
36+
ci/run_tests.sh
37+
test-linux-musl:
2238
docker:
2339
- image: quay.io/pypa/musllinux_1_1_aarch64
2440
resource_class: arm.large
2541
steps:
2642
# Install pkgs first to have git in the image
2743
# (needed for checkout)
28-
- run: |
29-
apk update
30-
apk add git
31-
apk add musl-locales
44+
- run:
45+
name: Install System Packages
46+
command: |
47+
apk update
48+
apk add git
49+
apk add musl-locales
3250
- checkout
33-
- run: |
34-
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
35-
. ~/virtualenvs/pandas-dev/bin/activate
36-
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
37-
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
38-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
39-
python -m pip list --no-cache-dir
40-
- run: |
41-
. ~/virtualenvs/pandas-dev/bin/activate
42-
export PANDAS_CI=1
43-
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
51+
- run:
52+
name: Install Environment and Run Tests
53+
command: |
54+
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
55+
. ~/virtualenvs/pandas-dev/bin/activate
56+
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
57+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
58+
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
59+
python -m pip list --no-cache-dir
60+
export PANDAS_CI=1
61+
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
4462
build-aarch64:
4563
parameters:
4664
cibw-build:
@@ -71,7 +89,7 @@ jobs:
7189
name: Build aarch64 wheels
7290
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
7391
command: |
74-
pip3 install cibuildwheel==2.15.0
92+
pip3 install cibuildwheel==2.18.1
7593
cibuildwheel --prerelease-pythons --output-dir wheelhouse
7694
7795
environment:
@@ -81,7 +99,7 @@ jobs:
8199
name: Install Anaconda Client & Upload Wheels
82100
command: |
83101
echo "Install Mambaforge"
84-
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
102+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh"
85103
echo "Downloading $MAMBA_URL"
86104
wget -q $MAMBA_URL -O minimamba.sh
87105
chmod +x minimamba.sh
@@ -107,14 +125,14 @@ workflows:
107125
not:
108126
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
109127
jobs:
110-
- test-arm
128+
- test-linux-arm
111129
test-musl:
112130
# Don't run trigger this one when scheduled pipeline runs
113131
when:
114132
not:
115133
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
116134
jobs:
117-
- linux-musl
135+
- test-linux-musl
118136
build-wheels:
119137
jobs:
120138
- build-aarch64:

.circleci/setup_env.sh

Lines changed: 0 additions & 60 deletions
This file was deleted.

ci/code_checks.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
343343
-i "pandas.arrays.NumpyExtensionArray SA01" \
344344
-i "pandas.arrays.SparseArray PR07,SA01" \
345345
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
346-
-i "pandas.bdate_range RT03,SA01" \
347346
-i "pandas.core.groupby.DataFrameGroupBy.__iter__ RT03,SA01" \
348347
-i "pandas.core.groupby.DataFrameGroupBy.agg RT03" \
349348
-i "pandas.core.groupby.DataFrameGroupBy.aggregate RT03" \
@@ -404,7 +403,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
404403
-i "pandas.core.window.rolling.Window.std PR01" \
405404
-i "pandas.core.window.rolling.Window.var PR01" \
406405
-i "pandas.date_range RT03" \
407-
-i "pandas.describe_option SA01" \
408406
-i "pandas.errors.AbstractMethodError PR01,SA01" \
409407
-i "pandas.errors.AttributeConflictWarning SA01" \
410408
-i "pandas.errors.CSSWarning SA01" \
@@ -472,7 +470,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
472470
-i "pandas.merge_ordered PR07" \
473471
-i "pandas.period_range RT03,SA01" \
474472
-i "pandas.pivot PR07" \
475-
-i "pandas.pivot_table PR07" \
476473
-i "pandas.plotting.andrews_curves RT03,SA01" \
477474
-i "pandas.plotting.lag_plot RT03,SA01" \
478475
-i "pandas.plotting.scatter_matrix PR07,SA01" \

ci/deps/circle-310-arm64.yaml renamed to ci/deps/circle-311-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: pandas-dev
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.10
5+
- python=3.11
66

77
# build dependencies
88
- versioneer[toml]

doc/source/getting_started/index.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ to explore, clean, and process your data. In pandas, a data table is called a :c
134134
<div id="collapseTwo" class="collapse" data-parent="#accordion">
135135
<div class="card-body">
136136

137-
pandas supports the integration with many file formats or data sources out of the box (csv, excel, sql, json, parquet,…). Importing data from each of these
138-
data sources is provided by function with the prefix ``read_*``. Similarly, the ``to_*`` methods are used to store data.
137+
pandas supports the integration with many file formats or data sources out of the box (csv, excel, sql, json, parquet,…). The ability to import data from each of these
138+
data sources is provided by functions with the prefix, ``read_*``. Similarly, the ``to_*`` methods are used to store data.
139139

140140
.. image:: ../_static/schemas/02_io_readwrite.svg
141141
:align: center
@@ -181,7 +181,7 @@ data sources is provided by function with the prefix ``read_*``. Similarly, the
181181
<div id="collapseThree" class="collapse" data-parent="#accordion">
182182
<div class="card-body">
183183

184-
Selecting or filtering specific rows and/or columns? Filtering the data on a condition? Methods for slicing, selecting, and extracting the
184+
Selecting or filtering specific rows and/or columns? Filtering the data on a particular condition? Methods for slicing, selecting, and extracting the
185185
data you need are available in pandas.
186186

187187
.. image:: ../_static/schemas/03_subset_columns_rows.svg
@@ -228,7 +228,7 @@ data you need are available in pandas.
228228
<div id="collapseFour" class="collapse" data-parent="#accordion">
229229
<div class="card-body">
230230

231-
pandas provides plotting your data out of the box, using the power of Matplotlib. You can pick the plot type (scatter, bar, boxplot,...)
231+
pandas provides plotting for your data right out of the box with the power of Matplotlib. Simply pick the plot type (scatter, bar, boxplot,...)
232232
corresponding to your data.
233233

234234
.. image:: ../_static/schemas/04_plot_overview.svg
@@ -275,7 +275,7 @@ corresponding to your data.
275275
<div id="collapseFive" class="collapse" data-parent="#accordion">
276276
<div class="card-body">
277277

278-
There is no need to loop over all rows of your data table to do calculations. Data manipulations on a column work elementwise.
278+
There's no need to loop over all rows of your data table to do calculations. Column data manipulations work elementwise in pandas.
279279
Adding a column to a :class:`DataFrame` based on existing data in other columns is straightforward.
280280

281281
.. image:: ../_static/schemas/05_newcolumn_2.svg
@@ -322,7 +322,7 @@ Adding a column to a :class:`DataFrame` based on existing data in other columns
322322
<div id="collapseSix" class="collapse" data-parent="#accordion">
323323
<div class="card-body">
324324

325-
Basic statistics (mean, median, min, max, counts...) are easily calculable. These or custom aggregations can be applied on the entire
325+
Basic statistics (mean, median, min, max, counts...) are easily calculable across data frames. These, or even custom aggregations, can be applied on the entire
326326
data set, a sliding window of the data, or grouped by categories. The latter is also known as the split-apply-combine approach.
327327

328328
.. image:: ../_static/schemas/06_groupby.svg
@@ -369,8 +369,8 @@ data set, a sliding window of the data, or grouped by categories. The latter is
369369
<div id="collapseSeven" class="collapse" data-parent="#accordion">
370370
<div class="card-body">
371371

372-
Change the structure of your data table in multiple ways. You can :func:`~pandas.melt` your data table from wide to long/tidy form or :func:`~pandas.pivot`
373-
from long to wide format. With aggregations built-in, a pivot table is created with a single command.
372+
Change the structure of your data table in a variety of ways. You can use :func:`~pandas.melt` to reshape your data from a wide format to a long and tidy one. Use :func:`~pandas.pivot`
373+
to go from long to wide format. With aggregations built-in, a pivot table can be created with a single command.
374374

375375
.. image:: ../_static/schemas/07_melt.svg
376376
:align: center
@@ -416,7 +416,7 @@ from long to wide format. With aggregations built-in, a pivot table is created w
416416
<div id="collapseEight" class="collapse" data-parent="#accordion">
417417
<div class="card-body">
418418

419-
Multiple tables can be concatenated both column wise and row wise as database-like join/merge operations are provided to combine multiple tables of data.
419+
Multiple tables can be concatenated column wise or row wise with pandas' database-like join and merge operations.
420420

421421
.. image:: ../_static/schemas/08_concat_row.svg
422422
:align: center
@@ -505,7 +505,7 @@ pandas has great support for time series and has an extensive set of tools for w
505505
<div id="collapseTen" class="collapse" data-parent="#accordion">
506506
<div class="card-body">
507507

508-
Data sets do not only contain numerical data. pandas provides a wide range of functions to clean textual data and extract useful information from it.
508+
Data sets often contain more than just numerical data. pandas provides a wide range of functions to clean textual data and extract useful information from it.
509509

510510
.. raw:: html
511511

@@ -551,9 +551,9 @@ the pandas-equivalent operations compared to software you already know:
551551
:class-card: comparison-card
552552
:shadow: md
553553

554-
The `R programming language <https://www.r-project.org/>`__ provides the
555-
``data.frame`` data structure and multiple packages, such as
556-
`tidyverse <https://www.tidyverse.org>`__ use and extend ``data.frame``
554+
The `R programming language <https://www.r-project.org/>`__ provides a
555+
``data.frame`` data structure as well as packages like
556+
`tidyverse <https://www.tidyverse.org>`__ which use and extend ``data.frame``
557557
for convenient data handling functionalities similar to pandas.
558558

559559
+++
@@ -572,8 +572,8 @@ the pandas-equivalent operations compared to software you already know:
572572
:class-card: comparison-card
573573
:shadow: md
574574

575-
Already familiar to ``SELECT``, ``GROUP BY``, ``JOIN``, etc.?
576-
Most of these SQL manipulations do have equivalents in pandas.
575+
Already familiar with ``SELECT``, ``GROUP BY``, ``JOIN``, etc.?
576+
Many SQL manipulations have equivalents in pandas.
577577

578578
+++
579579

@@ -631,10 +631,10 @@ the pandas-equivalent operations compared to software you already know:
631631
:class-card: comparison-card
632632
:shadow: md
633633

634-
The `SAS <https://en.wikipedia.org/wiki/SAS_(software)>`__ statistical software suite
635-
also provides the ``data set`` corresponding to the pandas ``DataFrame``.
636-
Also SAS vectorized operations, filtering, string processing operations,
637-
and more have similar functions in pandas.
634+
`SAS <https://en.wikipedia.org/wiki/SAS_(software)>`__, the statistical software suite,
635+
uses the ``data set`` structure, which closely corresponds pandas' ``DataFrame``.
636+
Also SAS vectorized operations such as filtering or string processing operations
637+
have similar functions in pandas.
638638

639639
+++
640640

doc/source/whatsnew/v3.0.0.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ starting with 3.0, so it can be safely removed from your code.
263263
Other Deprecations
264264
^^^^^^^^^^^^^^^^^^
265265

266+
- Deprecated :func:`core.internals.api.make_block`, use public APIs instead (:issue:`56815`)
267+
- Deprecated :meth:`.DataFrameGroupby.corrwith` (:issue:`57158`)
266268
- Deprecated :meth:`Timestamp.utcfromtimestamp`, use ``Timestamp.fromtimestamp(ts, "UTC")`` instead (:issue:`56680`)
267269
- Deprecated :meth:`Timestamp.utcnow`, use ``Timestamp.now("UTC")`` instead (:issue:`56680`)
268270
- Deprecated allowing non-keyword arguments in :meth:`DataFrame.all`, :meth:`DataFrame.min`, :meth:`DataFrame.max`, :meth:`DataFrame.sum`, :meth:`DataFrame.prod`, :meth:`DataFrame.mean`, :meth:`DataFrame.median`, :meth:`DataFrame.sem`, :meth:`DataFrame.var`, :meth:`DataFrame.std`, :meth:`DataFrame.skew`, :meth:`DataFrame.kurt`, :meth:`Series.all`, :meth:`Series.min`, :meth:`Series.max`, :meth:`Series.sum`, :meth:`Series.prod`, :meth:`Series.mean`, :meth:`Series.median`, :meth:`Series.sem`, :meth:`Series.var`, :meth:`Series.std`, :meth:`Series.skew`, and :meth:`Series.kurt`. (:issue:`57087`)
@@ -271,7 +273,6 @@ Other Deprecations
271273
- Deprecated behavior of :meth:`Series.dt.to_pytimedelta`, in a future version this will return a :class:`Series` containing python ``datetime.timedelta`` objects instead of an ``ndarray`` of timedelta; this matches the behavior of other :meth:`Series.dt` properties. (:issue:`57463`)
272274
- Deprecated parameter ``method`` in :meth:`DataFrame.reindex_like` / :meth:`Series.reindex_like` (:issue:`58667`)
273275
- Deprecated using ``epoch`` date format in :meth:`DataFrame.to_json` and :meth:`Series.to_json`, use ``iso`` instead. (:issue:`57063`)
274-
-
275276

276277
.. ---------------------------------------------------------------------------
277278
.. _whatsnew_300.prior_deprecations:
@@ -534,6 +535,7 @@ Groupby/resample/rolling
534535
- Bug in :meth:`.DataFrameGroupBy.quantile` when ``interpolation="nearest"`` is inconsistent with :meth:`DataFrame.quantile` (:issue:`47942`)
535536
- Bug in :meth:`.Resampler.interpolate` on a :class:`DataFrame` with non-uniform sampling and/or indices not aligning with the resulting resampled index would result in wrong interpolation (:issue:`21351`)
536537
- Bug in :meth:`DataFrame.ewm` and :meth:`Series.ewm` when passed ``times`` and aggregation functions other than mean (:issue:`51695`)
538+
- Bug in :meth:`DataFrameGroupBy.agg` that raises ``AttributeError`` when there is dictionary input and duplicated columns, instead of returning a DataFrame with the aggregation of all duplicate columns. (:issue:`55041`)
537539
- Bug in :meth:`DataFrameGroupBy.apply` that was returning a completely empty DataFrame when all return values of ``func`` were ``None`` instead of returning an empty DataFrame with the original columns and dtypes. (:issue:`57775`)
538540
- Bug in :meth:`DataFrameGroupBy.apply` with ``as_index=False`` that was returning :class:`MultiIndex` instead of returning :class:`Index`. (:issue:`58291`)
539541
- Bug in :meth:`DataFrameGroupby.transform` and :meth:`SeriesGroupby.transform` with a reducer and ``observed=False`` that coerces dtype to float when there are unobserved categories. (:issue:`55326`)

pandas/_config/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ def describe_option(pat: str = "", _print_desc: bool = True) -> str | None:
279279
str
280280
If the description(s) as a string if ``_print_desc=False``.
281281
282+
See Also
283+
--------
284+
get_option : Retrieve the value of the specified option.
285+
set_option : Set the value of the specified option or options.
286+
reset_option : Reset one or more options to their default value.
287+
282288
Notes
283289
-----
284290
For all available options, please view the

pandas/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def pytest_collection_modifyitems(items, config) -> None:
150150
("is_categorical_dtype", "is_categorical_dtype is deprecated"),
151151
("is_sparse", "is_sparse is deprecated"),
152152
("DataFrameGroupBy.fillna", "DataFrameGroupBy.fillna is deprecated"),
153+
("DataFrameGroupBy.corrwith", "DataFrameGroupBy.corrwith is deprecated"),
153154
("NDFrame.replace", "Series.replace without 'value'"),
154155
("NDFrame.clip", "Downcasting behavior in Series and DataFrame methods"),
155156
("Series.idxmin", "The behavior of Series.idxmin"),

0 commit comments

Comments
 (0)