Skip to content

Commit 198cbeb

Browse files
jrebackNo-Stream
authored andcommitted
CLN: some lint issues
1 parent 2dbf013 commit 198cbeb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/core/groupby.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -3648,9 +3648,9 @@ def _cython_agg_blocks(self, how, alt=None, numeric_only=True):
36483648

36493649
offset = 0
36503650
for b in new_blocks:
3651-
l = len(b.mgr_locs)
3652-
b.mgr_locs = indexer[offset:(offset + l)]
3653-
offset += l
3651+
loc = len(b.mgr_locs)
3652+
b.mgr_locs = indexer[offset:(offset + loc)]
3653+
offset += loc
36543654

36553655
return new_items, new_blocks
36563656

@@ -3689,7 +3689,7 @@ def aggregate(self, arg, *args, **kwargs):
36893689
result.columns = Index(
36903690
result.columns.levels[0],
36913691
name=self._selected_obj.columns.name)
3692-
except:
3692+
except Exception:
36933693
result = self._aggregate_generic(arg, *args, **kwargs)
36943694

36953695
if not self.as_index:
@@ -4078,7 +4078,7 @@ def _choose_path(self, fast_path, slow_path, group):
40784078
if (res_r[mask] == res_fast_r[mask]).all():
40794079
path = fast_path
40804080

4081-
except:
4081+
except Exception:
40824082
pass
40834083
return path, res
40844084

@@ -4652,7 +4652,7 @@ def fast_apply(self, f, names):
46524652
# must return keys::list, values::list, mutated::bool
46534653
try:
46544654
starts, ends = lib.generate_slices(self.slabels, self.ngroups)
4655-
except:
4655+
except Exception:
46564656
# fails when all -1
46574657
return [], True
46584658

0 commit comments

Comments
 (0)