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 @@ -486,20 +486,14 @@ def compute_dict_like(
486486 cols = df [key ]
487487
488488 if cols .ndim == 1 :
489- series_list = [obj ._gotitem (key , ndim = 1 , subset = cols )]
489+ series = obj ._gotitem (key , ndim = 1 , subset = cols )
490+ results .append (getattr (series , op_name )(how , ** kwargs ))
491+ keys .append (key )
490492 else :
491- series_list = []
492- for index in range (cols .shape [1 ]):
493- col = cols .iloc [:, index ]
494-
493+ for _ , col in cols .items ():
495494 series = obj ._gotitem (key , ndim = 1 , subset = col )
496- series_list .append (series )
497-
498- for series in series_list :
499- result = getattr (series , op_name )(how , ** kwargs )
500- results .append (result )
501- keys .append (key )
502-
495+ results .append (getattr (series , op_name )(how , ** kwargs ))
496+ keys .append (key )
503497 else :
504498 results = [
505499 getattr (obj ._gotitem (key , ndim = 1 ), op_name )(how , ** kwargs )
You can’t perform that action at this time.
0 commit comments