@@ -1882,10 +1882,10 @@ def _get_cythonized_result(self, how, grouper, needs_mask=False,
1882
1882
base_func = getattr (libgroupby , how )
1883
1883
1884
1884
for name , obj in self ._iterate_slices ():
1885
- indexer = np .zeros_like (labels )
1885
+ indexer = np .zeros_like (labels , dtype = np . int64 )
1886
1886
func = partial (base_func , indexer , labels )
1887
1887
if needs_mask :
1888
- mask = isnull (obj .values ).astype (np .uint8 , copy = False )
1888
+ mask = isnull (obj .values ).view (np .uint8 )
1889
1889
func = partial (func , mask )
1890
1890
1891
1891
if needs_ngroups :
@@ -4633,12 +4633,11 @@ def _apply_to_column_groupbys(self, func):
4633
4633
keys = self ._selected_obj .columns , axis = 1 )
4634
4634
4635
4635
def _fill (self , direction , limit = None ):
4636
- """Overriden method to concat grouped columns in output"""
4636
+ """Overriden method to join grouped columns in output"""
4637
4637
res = super ()._fill (direction , limit = limit )
4638
- output = collections .OrderedDict ()
4639
- for grp in self .grouper .groupings :
4640
- ser = grp .group_index .take (grp .labels )
4641
- output [ser .name ] = ser .values
4638
+ output = collections .OrderedDict (
4639
+ (grp .name , grp .group_index .take (grp .labels )) for grp in
4640
+ self .grouper .groupings )
4642
4641
4643
4642
return self ._wrap_transformed_output (output ).join (res )
4644
4643
0 commit comments