Skip to content

Commit 5c73d99

Browse files
authored
CLN: Remove .values from groupby.sem (#38044)
1 parent 42084f4 commit 5c73d99

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/groupby/groupby.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1600,10 +1600,8 @@ def sem(self, ddof: int = 1):
16001600
cols = result.columns.get_indexer_for(
16011601
result.columns.difference(self.exclusions).unique()
16021602
)
1603-
# TODO(GH-22046) - setting with iloc broken if labels are not unique
1604-
# .values to remove labels
1605-
result.iloc[:, cols] = (
1606-
result.iloc[:, cols].values / np.sqrt(self.count().iloc[:, cols]).values
1603+
result.iloc[:, cols] = result.iloc[:, cols] / np.sqrt(
1604+
self.count().iloc[:, cols]
16071605
)
16081606
return result
16091607

0 commit comments

Comments
 (0)