Skip to content

Commit

Permalink
just replace error message
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Jun 2, 2019
1 parent 3bee5d7 commit 0057702
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2345,14 +2345,7 @@ def _legal_dtype(series):
# no NaNs - can just concatenate
result = cat_core(all_cols, sep)
except TypeError as exc:
if re.match((r'can only concatenate str \(not [\w\"]+) to str'
r'|' # different numpy version have...
r'Can\'t convert [\w\']+ object to str implicitly'
r'|' # ... different error messages in np.sum
r'must be str, not \w+'),
str(exc)):
raise TypeError(err_wrong_dtype)
raise exc
raise TypeError(err_wrong_dtype)

if isinstance(self._orig, Index):
# add dtype for case that result is all-NA
Expand Down

0 comments on commit 0057702

Please sign in to comment.