Skip to content

Commit d834295

Browse files
jbrockmendelfeefladder
authored andcommitted
PERF: GroupBy.std operate blockwise instead of column-wise (pandas-dev#43115)
1 parent 897c720 commit d834295

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/groupby/groupby.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2918,7 +2918,7 @@ def _get_cythonized_result(
29182918
if min_count is not None:
29192919
base_func = partial(base_func, min_count=min_count)
29202920

2921-
real_2d = how in ["group_any_all"]
2921+
real_2d = how in ["group_any_all", "group_var"]
29222922

29232923
def blk_func(values: ArrayLike) -> ArrayLike:
29242924
values = values.T
@@ -2999,7 +2999,6 @@ def blk_func(values: ArrayLike) -> ArrayLike:
29992999
obj = self._obj_with_exclusions
30003000
if obj.ndim == 2 and self.axis == 0 and needs_2d and real_2d:
30013001
# Operate block-wise instead of column-by-column
3002-
30033002
mgr = obj._mgr
30043003
if numeric_only:
30053004
mgr = mgr.get_numeric_data()

0 commit comments

Comments
 (0)