Skip to content

Commit 3a91169

Browse files
committed
fixup! fixup! STYLE: fix pylint unnecessary-comprehension warnings
1 parent 5831cd5 commit 3a91169

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pandas/tests/groupby/test_grouping.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -946,11 +946,7 @@ def test_multi_iter_frame(self, three_group):
946946
df["k1"] = np.array(["b", "b", "b", "a", "a", "a"])
947947
df["k2"] = np.array(["1", "1", "1", "2", "2", "2"])
948948
grouped = df.groupby(["k1", "k2"])
949-
# calling `dict` on a DataFrameGroupBy leads to a TypeError,
950-
# we need to use a dictionary comprehension here
951-
groups = {
952-
key: gp for key, gp in grouped
953-
} # pylint: disable=unnecessary-comprehension
949+
groups = dict(grouped.items())
954950
assert len(groups) == 2
955951

956952
# axis = 1

0 commit comments

Comments
 (0)