File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -116,20 +116,20 @@ def _groupby_and_merge(
116116
117117 # if we can groupby the rhs
118118 # then we can get vastly better perf
119- try :
120119
121- # we will check & remove duplicates if indicated
122- if check_duplicates :
123- if on is None :
124- on = []
125- elif not isinstance (on , (list , tuple )):
126- on = [on ]
127-
128- if right .duplicated (by + on ).any ():
129- _right = right .drop_duplicates (by + on , keep = "last" )
130- # TODO: use overload to refine return type of drop_duplicates
131- assert _right is not None # needed for mypy
132- right = _right
120+ # we will check & remove duplicates if indicated
121+ if check_duplicates :
122+ if on is None :
123+ on = []
124+ elif not isinstance (on , (list , tuple )):
125+ on = [on ]
126+
127+ if right .duplicated (by + on ).any ():
128+ _right = right .drop_duplicates (by + on , keep = "last" )
129+ # TODO: use overload to refine return type of drop_duplicates
130+ assert _right is not None # needed for mypy
131+ right = _right
132+ try :
133133 rby = right .groupby (by , sort = False )
134134 except KeyError :
135135 rby = None
You can’t perform that action at this time.
0 commit comments