@@ -157,8 +157,8 @@ def _set_grouper(self, obj, sort=False):
157
157
if self .key is not None :
158
158
key = self .key
159
159
# The 'on' is already defined
160
- if getattr (self .grouper , 'name' , None ) == key and \
161
- isinstance (obj , ABCSeries ):
160
+ if ( getattr (self .grouper , 'name' , None ) == key and
161
+ isinstance (obj , ABCSeries )) :
162
162
ax = self ._grouper .take (obj .index )
163
163
else :
164
164
if key not in obj ._info_axis :
@@ -530,9 +530,9 @@ def _get_grouper(obj, key=None, axis=0, level=None, sort=True,
530
530
except Exception :
531
531
all_in_columns_index = False
532
532
533
- if not any_callable and not all_in_columns_index and \
534
- not any_arraylike and not any_groupers and \
535
- match_axis_length and level is None :
533
+ if ( not any_callable and not all_in_columns_index and
534
+ not any_arraylike and not any_groupers and
535
+ match_axis_length and level is None ) :
536
536
keys = [com .asarray_tuplesafe (keys )]
537
537
538
538
if isinstance (level , (tuple , list )):
@@ -593,15 +593,15 @@ def is_in_obj(gpr):
593
593
594
594
# create the Grouping
595
595
# allow us to passing the actual Grouping as the gpr
596
- ping = Grouping (group_axis ,
597
- gpr ,
598
- obj = obj ,
599
- name = name ,
600
- level = level ,
601
- sort = sort ,
602
- observed = observed ,
603
- in_axis = in_axis ) \
604
- if not isinstance (gpr , Grouping ) else gpr
596
+ ping = ( Grouping (group_axis ,
597
+ gpr ,
598
+ obj = obj ,
599
+ name = name ,
600
+ level = level ,
601
+ sort = sort ,
602
+ observed = observed ,
603
+ in_axis = in_axis )
604
+ if not isinstance (gpr , Grouping ) else gpr )
605
605
606
606
groupings .append (ping )
607
607
0 commit comments