Skip to content

Commit 0769cfe

Browse files
committed
Cleanup
1 parent 055562c commit 0769cfe

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

pandas/core/groupby/ops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,7 @@ def result_index(self) -> Index:
747747
def ids(self) -> npt.NDArray[np.intp]:
748748
return self.result_index_and_ids[1]
749749

750-
# @cache_readonly
751-
@property
750+
@cache_readonly
752751
def result_index_and_ids(self) -> tuple[Index, npt.NDArray[np.intp]]:
753752
levels = [Index._with_infer(ping.uniques) for ping in self.groupings]
754753
obs = [

pandas/tests/frame/methods/test_value_counts.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,7 @@ def test_data_frame_value_counts_dropna_true(nulls_fixture):
128128
expected = pd.Series(
129129
data=[1, 1],
130130
index=pd.MultiIndex.from_arrays(
131-
[
132-
(
133-
"John",
134-
"Beth",
135-
),
136-
(
137-
"Smith",
138-
"Louise",
139-
),
140-
],
141-
names=["first_name", "middle_name"],
131+
[("John", "Beth"), ("Smith", "Louise")], names=["first_name", "middle_name"]
142132
),
143133
name="count",
144134
)

pandas/tests/groupby/methods/test_value_counts.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -526,17 +526,7 @@ def test_dropna_combinations(
526526
True,
527527
[1, 1],
528528
MultiIndex.from_arrays(
529-
[
530-
(1, 1),
531-
(
532-
"John",
533-
"Beth",
534-
),
535-
(
536-
"Smith",
537-
"Louise",
538-
),
539-
],
529+
[(1, 1), ("John", "Beth"), ("Smith", "Louise")],
540530
names=["key", "first_name", "middle_name"],
541531
),
542532
),

0 commit comments

Comments
 (0)