Skip to content

Commit ce38be2

Browse files
authored
Merge branch 'main' into cooolheater-issue59965
2 parents 7c02c77 + e3a3a4a commit ce38be2

14 files changed

+38
-19
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ minimum_pre_commit_version: 2.15.0
22
exclude: ^LICENSES/|\.(html|csv|svg)$
33
# reserve "manual" for relatively slow hooks which we still want to run in CI
44
default_stages: [
5-
commit,
6-
merge-commit,
7-
push,
5+
pre-commit,
6+
pre-merge-commit,
7+
pre-push,
88
prepare-commit-msg,
99
commit-msg,
1010
post-checkout,

ci/code_checks.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
9797
-i "pandas.arrays.NumpyExtensionArray SA01" \
9898
-i "pandas.arrays.SparseArray PR07,SA01" \
9999
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
100-
-i "pandas.core.groupby.DataFrameGroupBy.__iter__ RT03,SA01" \
101100
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
102101
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
103102
-i "pandas.core.groupby.DataFrameGroupBy.groups SA01" \
@@ -106,7 +105,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
106105
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
107106
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
108107
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
109-
-i "pandas.core.groupby.SeriesGroupBy.__iter__ RT03,SA01" \
110108
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
111109
-i "pandas.core.groupby.SeriesGroupBy.groups SA01" \
112110
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
@@ -115,7 +113,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
115113
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
116114
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
117115
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
118-
-i "pandas.core.resample.Resampler.__iter__ RT03,SA01" \
119116
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \
120117
-i "pandas.core.resample.Resampler.groups SA01" \
121118
-i "pandas.core.resample.Resampler.indices SA01" \
@@ -143,7 +140,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
143140
-i "pandas.errors.OutOfBoundsTimedelta SA01" \
144141
-i "pandas.errors.PerformanceWarning SA01" \
145142
-i "pandas.errors.PossibleDataLossError SA01" \
146-
-i "pandas.errors.PossiblePrecisionLoss SA01" \
147143
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
148144
-i "pandas.errors.UnsortedIndexError SA01" \
149145
-i "pandas.errors.UnsupportedFunctionCall SA01" \

ci/deps/actions-310.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies:
5252
- scipy>=1.10.0
5353
- sqlalchemy>=2.0.0
5454
- tabulate>=0.9.0
55-
- xarray>=2022.12.0
55+
- xarray>=2022.12.0, <=2024.9.0
5656
- xlrd>=2.0.1
5757
- xlsxwriter>=3.0.5
5858
- zstandard>=0.19.0

ci/deps/actions-311-downstream_compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ dependencies:
5353
- scipy>=1.10.0
5454
- sqlalchemy>=2.0.0
5555
- tabulate>=0.9.0
56-
- xarray>=2022.12.0
56+
- xarray>=2022.12.0, <=2024.9.0
5757
- xlrd>=2.0.1
5858
- xlsxwriter>=3.0.5
5959
- zstandard>=0.19.0

ci/deps/actions-311.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies:
5252
- scipy>=1.10.0
5353
- sqlalchemy>=2.0.0
5454
- tabulate>=0.9.0
55-
- xarray>=2022.12.0
55+
- xarray>=2022.12.0, <=2024.9.0
5656
- xlrd>=2.0.1
5757
- xlsxwriter>=3.0.5
5858
- zstandard>=0.19.0

ci/deps/actions-312.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies:
5252
- scipy>=1.10.0
5353
- sqlalchemy>=2.0.0
5454
- tabulate>=0.9.0
55-
- xarray>=2022.12.0
55+
- xarray>=2022.12.0, <=2024.9.0
5656
- xlrd>=2.0.1
5757
- xlsxwriter>=3.0.5
5858
- zstandard>=0.19.0

ci/deps/circle-311-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies:
5252
- scipy>=1.10.0
5353
- sqlalchemy>=2.0.0
5454
- tabulate>=0.9.0
55-
- xarray>=2022.12.0
55+
- xarray>=2022.12.0, <2024.10.0
5656
- xlrd>=2.0.1
5757
- xlsxwriter>=3.0.5
5858
- zstandard>=0.19.0

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dependencies:
5555
- scipy>=1.10.0
5656
- sqlalchemy>=2.0.0
5757
- tabulate>=0.9.0
58-
- xarray>=2022.12.0
58+
- xarray>=2022.12.0, <=2024.9.0
5959
- xlrd>=2.0.1
6060
- xlsxwriter>=3.0.5
6161
- zstandard>=0.19.0

pandas/core/groupby/groupby.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,24 @@ def __iter__(self) -> Iterator[tuple[Hashable, NDFrameT]]:
767767
"""
768768
Groupby iterator.
769769
770+
This method provides an iterator over the groups created by the ``resample``
771+
or ``groupby`` operation on the object. The method yields tuples where
772+
the first element is the label (group key) corresponding to each group or
773+
resampled bin, and the second element is the subset of the data that falls
774+
within that group or bin.
775+
770776
Returns
771777
-------
772-
Generator yielding sequence of (name, subsetted object)
773-
for each group
778+
Iterator
779+
Generator yielding a sequence of (name, subsetted object)
780+
for each group.
781+
782+
See Also
783+
--------
784+
Series.groupby : Group data by a specific key or column.
785+
DataFrame.groupby : Group DataFrame using mapper or by columns.
786+
DataFrame.resample : Resample a DataFrame.
787+
Series.resample : Resample a Series.
774788
775789
Examples
776790
--------

pandas/core/strings/accessor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ def _validate(data):
255255
inferred_dtype = lib.infer_dtype(values, skipna=True)
256256

257257
if inferred_dtype not in allowed_types:
258-
raise AttributeError("Can only use .str accessor with string values!")
258+
raise AttributeError(
259+
f"Can only use .str accessor with string values, not {inferred_dtype}"
260+
)
259261
return inferred_dtype
260262

261263
def __getitem__(self, key):

0 commit comments

Comments
 (0)