Skip to content

Commit 293f8d0

Browse files
authored
Merge branch 'main' into Solution-for-issue-#60044
2 parents 53559a4 + 8d2ca0b commit 293f8d0

File tree

10 files changed

+32
-16
lines changed

10 files changed

+32
-16
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,34 +97,28 @@ 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" \
104103
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
105104
-i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \
106105
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
107-
-i "pandas.core.groupby.DataFrameGroupBy.ohlc SA01" \
108106
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
109107
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
110-
-i "pandas.core.groupby.SeriesGroupBy.__iter__ RT03,SA01" \
111108
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
112109
-i "pandas.core.groupby.SeriesGroupBy.groups SA01" \
113110
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
114111
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
115112
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
116113
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
117-
-i "pandas.core.groupby.SeriesGroupBy.ohlc SA01" \
118114
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
119115
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
120-
-i "pandas.core.resample.Resampler.__iter__ RT03,SA01" \
121116
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \
122117
-i "pandas.core.resample.Resampler.groups SA01" \
123118
-i "pandas.core.resample.Resampler.indices SA01" \
124119
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
125120
-i "pandas.core.resample.Resampler.mean SA01" \
126121
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
127-
-i "pandas.core.resample.Resampler.ohlc SA01" \
128122
-i "pandas.core.resample.Resampler.prod SA01" \
129123
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
130124
-i "pandas.core.resample.Resampler.sem 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: 22 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
--------
@@ -3224,6 +3238,12 @@ def ohlc(self) -> DataFrame:
32243238
DataFrame
32253239
Open, high, low and close values within each group.
32263240
3241+
See Also
3242+
--------
3243+
DataFrame.agg : Aggregate using one or more operations over the specified axis.
3244+
DataFrame.resample : Resample time-series data.
3245+
DataFrame.groupby : Group DataFrame using a mapper or by a Series of columns.
3246+
32273247
Examples
32283248
--------
32293249

pandas/tests/io/test_spss.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,6 @@ def test_spss_metadata(datapath):
177177
"modification_time": datetime.datetime(2015, 2, 6, 14, 33, 36),
178178
}
179179
)
180-
assert df.attrs == metadata
180+
if Version(pyreadstat.__version__) >= Version("1.2.8"):
181+
metadata["mr_sets"] = {}
182+
tm.assert_dict_equal(df.attrs, metadata)

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ s3fs>=2022.11.0
4444
scipy>=1.10.0
4545
SQLAlchemy>=2.0.0
4646
tabulate>=0.9.0
47-
xarray>=2022.12.0
47+
xarray>=2022.12.0, <=2024.9.0
4848
xlrd>=2.0.1
4949
xlsxwriter>=3.0.5
5050
zstandard>=0.19.0

0 commit comments

Comments
 (0)