Skip to content

Commit

Permalink
CLN: Remove .values from groupby.sem (#38044)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Nov 26, 2020
1 parent 42084f4 commit 5c73d99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pandas/core/groupby/groupby.py
Expand Up @@ -1600,10 +1600,8 @@ def sem(self, ddof: int = 1):
cols = result.columns.get_indexer_for(
result.columns.difference(self.exclusions).unique()
)
# TODO(GH-22046) - setting with iloc broken if labels are not unique
# .values to remove labels
result.iloc[:, cols] = (
result.iloc[:, cols].values / np.sqrt(self.count().iloc[:, cols]).values
result.iloc[:, cols] = result.iloc[:, cols] / np.sqrt(
self.count().iloc[:, cols]
)
return result

Expand Down

0 comments on commit 5c73d99

Please sign in to comment.