File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -480,20 +480,14 @@ def compute_dict_like(
480
480
cols = df [key ]
481
481
482
482
if cols .ndim == 1 :
483
- series_list = [obj ._gotitem (key , ndim = 1 , subset = cols )]
483
+ series = obj ._gotitem (key , ndim = 1 , subset = cols )
484
+ results .append (getattr (series , op_name )(how , ** kwargs ))
485
+ keys .append (key )
484
486
else :
485
- series_list = []
486
- for index in range (cols .shape [1 ]):
487
- col = cols .iloc [:, index ]
488
-
487
+ for _ , col in cols .items ():
489
488
series = obj ._gotitem (key , ndim = 1 , subset = col )
490
- series_list .append (series )
491
-
492
- for series in series_list :
493
- result = getattr (series , op_name )(how , ** kwargs )
494
- results .append (result )
495
- keys .append (key )
496
-
489
+ results .append (getattr (series , op_name )(how , ** kwargs ))
490
+ keys .append (key )
497
491
else :
498
492
results = [
499
493
getattr (obj ._gotitem (key , ndim = 1 ), op_name )(how , ** kwargs )
You can’t perform that action at this time.
0 commit comments