Skip to content

Commit f5fd0f6

Browse files
authored
Merge branch 'main' into cibuildwheel_2.20.0
2 parents b1e96f7 + 7a5bfc4 commit f5fd0f6

File tree

10 files changed

+77
-21
lines changed

10 files changed

+77
-21
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- run:
1717
name: Install Environment and Run Tests
1818
shell: /bin/bash -exo pipefail
19+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
1920
command: |
2021
MINI_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-aarch64.sh"
2122
wget -q $MINI_URL -O Miniforge3.sh
@@ -33,6 +34,7 @@ jobs:
3334
fi
3435
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
3536
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
37+
sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
3638
ci/run_tests.sh
3739
test-linux-musl:
3840
docker:

.github/workflows/code-checks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ jobs:
5151
# TODO: The doctests have to be run first right now, since the Cython doctests only work
5252
# with pandas installed in non-editable mode
5353
# This can be removed once pytest-cython doesn't require C extensions to be installed inplace
54+
55+
- name: Extra installs
56+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
57+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
58+
5459
- name: Run doctests
5560
run: cd ci && ./code_checks.sh doctests
5661
if: ${{ steps.build.outcome == 'success' && always() }}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
- name: Build Pandas
4747
uses: ./.github/actions/build_pandas
4848

49+
- name: Extra installs
50+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
51+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
52+
4953
- name: Test website
5054
run: python -m pytest web/
5155

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ jobs:
134134
fetch-depth: 0
135135

136136
- name: Extra installs
137-
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.extra_apt }}
138-
if: ${{ matrix.extra_apt }}
137+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
138+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0 ${{ matrix.extra_apt || ''}}
139139

140140
- name: Generate extra locales
141141
# These extra locales will be available for locale.setlocale() calls in tests

ci/code_checks.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7070
--format=actions \
7171
-i ES01 `# For now it is ok if docstrings are missing the extended summary` \
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
73-
-i "pandas.MultiIndex.get_level_values SA01" \
7473
-i "pandas.MultiIndex.get_loc_level PR07" \
7574
-i "pandas.MultiIndex.names SA01" \
7675
-i "pandas.MultiIndex.reorder_levels RT03,SA01" \
@@ -165,9 +164,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
165164
-i "pandas.Series.str.center RT03,SA01" \
166165
-i "pandas.Series.str.decode PR07,RT03,SA01" \
167166
-i "pandas.Series.str.encode PR07,RT03,SA01" \
168-
-i "pandas.Series.str.find RT03" \
169167
-i "pandas.Series.str.fullmatch RT03" \
170-
-i "pandas.Series.str.get RT03,SA01" \
171168
-i "pandas.Series.str.index RT03" \
172169
-i "pandas.Series.str.ljust RT03,SA01" \
173170
-i "pandas.Series.str.lower RT03" \
@@ -177,7 +174,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
177174
-i "pandas.Series.str.partition RT03" \
178175
-i "pandas.Series.str.repeat SA01" \
179176
-i "pandas.Series.str.replace SA01" \
180-
-i "pandas.Series.str.rfind RT03" \
181177
-i "pandas.Series.str.rindex RT03" \
182178
-i "pandas.Series.str.rjust RT03,SA01" \
183179
-i "pandas.Series.str.rpartition RT03" \
@@ -267,9 +263,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
267263
-i "pandas.api.extensions.ExtensionArray.tolist RT03,SA01" \
268264
-i "pandas.api.extensions.ExtensionArray.unique RT03,SA01" \
269265
-i "pandas.api.extensions.ExtensionArray.view SA01" \
270-
-i "pandas.api.indexers.VariableOffsetWindowIndexer PR01,SA01" \
271266
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
272-
-i "pandas.api.types.is_any_real_numeric_dtype SA01" \
273267
-i "pandas.api.types.is_bool PR01,SA01" \
274268
-i "pandas.api.types.is_bool_dtype SA01" \
275269
-i "pandas.api.types.is_categorical_dtype SA01" \
@@ -296,7 +290,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
296290
-i "pandas.api.types.is_period_dtype SA01" \
297291
-i "pandas.api.types.is_re PR07,SA01" \
298292
-i "pandas.api.types.is_re_compilable PR07,SA01" \
299-
-i "pandas.api.types.is_sparse SA01" \
300293
-i "pandas.api.types.is_timedelta64_ns_dtype SA01" \
301294
-i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \
302295
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \

doc/source/user_guide/basics.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,6 @@ speedups. ``numexpr`` uses smart chunking, caching, and multiple cores. ``bottle
155155
a set of specialized cython routines that are especially fast when dealing with arrays that have
156156
``nans``.
157157

158-
Here is a sample (using 100 column x 100,000 row ``DataFrames``):
159-
160-
.. csv-table::
161-
:header: "Operation", "0.11.0 (ms)", "Prior Version (ms)", "Ratio to Prior"
162-
:widths: 25, 25, 25, 25
163-
164-
``df1 > df2``, 13.32, 125.35, 0.1063
165-
``df1 * df2``, 21.71, 36.63, 0.5928
166-
``df1 + df2``, 22.04, 36.50, 0.6039
167-
168158
You are highly encouraged to install both libraries. See the section
169159
:ref:`Recommended Dependencies <install.recommended_dependencies>` for more installation info.
170160

pandas/core/dtypes/common.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ def is_sparse(arr) -> bool:
187187
bool
188188
Whether or not the array-like is a pandas sparse array.
189189
190+
See Also
191+
--------
192+
api.types.SparseDtype : The dtype object for pandas sparse arrays.
193+
190194
Examples
191195
--------
192196
Returns `True` if the parameter is a 1-D pandas sparse array.
@@ -1181,6 +1185,12 @@ def is_any_real_numeric_dtype(arr_or_dtype) -> bool:
11811185
boolean
11821186
Whether or not the array or dtype is of a real number dtype.
11831187
1188+
See Also
1189+
--------
1190+
is_numeric_dtype : Check if a dtype is numeric.
1191+
is_complex_dtype : Check if a dtype is complex.
1192+
is_bool_dtype : Check if a dtype is boolean.
1193+
11841194
Examples
11851195
--------
11861196
>>> from pandas.api.types import is_any_real_numeric_dtype

pandas/core/indexers/objects.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,31 @@ class VariableOffsetWindowIndexer(BaseIndexer):
167167
"""
168168
Calculate window boundaries based on a non-fixed offset such as a BusinessDay.
169169
170+
Parameters
171+
----------
172+
index_array : np.ndarray, default 0
173+
Array-like structure specifying the indices for data points.
174+
This parameter is currently not used.
175+
176+
window_size : int, optional, default 0
177+
Specifies the number of data points in each window.
178+
This parameter is currently not used.
179+
180+
index : DatetimeIndex, optional
181+
``DatetimeIndex`` of the labels of each observation.
182+
183+
offset : BaseOffset, optional
184+
``DateOffset`` representing the size of the window.
185+
186+
**kwargs
187+
Additional keyword arguments passed to the parent class ``BaseIndexer``.
188+
189+
See Also
190+
--------
191+
api.indexers.BaseIndexer : Base class for all indexers.
192+
DataFrame.rolling : Rolling window calculations on DataFrames.
193+
offsets : Module providing various time offset classes.
194+
170195
Examples
171196
--------
172197
>>> from pandas.api.indexers import VariableOffsetWindowIndexer

pandas/core/indexes/multi.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,16 @@ def get_level_values(self, level) -> Index: # type: ignore[override]
17831783
Return vector of label values for requested level.
17841784
17851785
Length of returned vector is equal to the length of the index.
1786+
The `get_level_values` method is a crucial utility for extracting
1787+
specific level values from a `MultiIndex`. This function is particularly
1788+
useful when working with multi-level data, allowing you to isolate
1789+
and manipulate individual levels without having to deal with the
1790+
complexity of the entire `MultiIndex` structure. It seamlessly handles
1791+
both integer and string-based level access, providing flexibility in
1792+
how you can interact with the data. Additionally, this method ensures
1793+
that the returned `Index` maintains the integrity of the original data,
1794+
even when missing values are present, by appropriately casting the
1795+
result to a suitable data type.
17861796
17871797
Parameters
17881798
----------
@@ -1796,6 +1806,13 @@ def get_level_values(self, level) -> Index: # type: ignore[override]
17961806
Values is a level of this MultiIndex converted to
17971807
a single :class:`Index` (or subclass thereof).
17981808
1809+
See Also
1810+
--------
1811+
MultiIndex : A multi-level, or hierarchical, index object for pandas objects.
1812+
Index : Immutable sequence used for indexing and alignment.
1813+
MultiIndex.remove_unused_levels : Create new MultiIndex from current that
1814+
removes unused levels.
1815+
17991816
Notes
18001817
-----
18011818
If the level contains missing values, the result may be casted to

pandas/core/strings/accessor.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,13 @@ def get(self, i):
10851085
Returns
10861086
-------
10871087
Series or Index
1088+
Series or Index where each value is the extracted element from
1089+
the corresponding input component.
1090+
1091+
See Also
1092+
--------
1093+
Series.str.extract : Extract capture groups in the regex as columns
1094+
in a DataFrame.
10881095
10891096
Examples
10901097
--------
@@ -2971,6 +2978,9 @@ def extractall(self, pat, flags: int = 0) -> DataFrame:
29712978
Returns
29722979
-------
29732980
Series or Index of int.
2981+
A Series (if the input is a Series) or an Index (if the input is an
2982+
Index) of the %(side)s indexes corresponding to the positions where the
2983+
substring is found in each string of the input.
29742984
29752985
See Also
29762986
--------
@@ -2980,9 +2990,9 @@ def extractall(self, pat, flags: int = 0) -> DataFrame:
29802990
--------
29812991
For Series.str.find:
29822992
2983-
>>> ser = pd.Series(["cow_", "duck_", "do_ve"])
2993+
>>> ser = pd.Series(["_cow_", "duck_", "do_v_e"])
29842994
>>> ser.str.find("_")
2985-
0 3
2995+
0 0
29862996
1 4
29872997
2 2
29882998
dtype: int64

0 commit comments

Comments
 (0)