Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwillmer committed Jul 17, 2017
1 parent a81933d commit b82d117
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,11 +916,13 @@ def _maybe_coerce_merge_keys(self):
# Houston, we have a problem!
# let's coerce to object
if name in self.left.columns:
typ = lk.categories.dtype if is_categorical_dtype(lk) else object
cat = is_categorical_dtype(lk)
typ = lk.categories.dtype if cat else object
self.left = self.left.assign(
**{name: self.left[name].astype(typ)})
if name in self.right.columns:
typ = rk.categories.dtype if is_categorical_dtype(rk) else object
cat = is_categorical_dtype(rk)
typ = rk.categories.dtype if cat else object
self.right = self.right.assign(
**{name: self.right[name].astype(typ)})

Expand Down

0 comments on commit b82d117

Please sign in to comment.