We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bee5d7 commit 0057702Copy full SHA for 0057702
pandas/core/strings.py
@@ -2345,14 +2345,7 @@ def _legal_dtype(series):
2345
# no NaNs - can just concatenate
2346
result = cat_core(all_cols, sep)
2347
except TypeError as exc:
2348
- if re.match((r'can only concatenate str \(not [\w\"]+) to str'
2349
- r'|' # different numpy version have...
2350
- r'Can\'t convert [\w\']+ object to str implicitly'
2351
- r'|' # ... different error messages in np.sum
2352
- r'must be str, not \w+'),
2353
- str(exc)):
2354
- raise TypeError(err_wrong_dtype)
2355
- raise exc
+ raise TypeError(err_wrong_dtype)
2356
2357
if isinstance(self._orig, Index):
2358
# add dtype for case that result is all-NA
0 commit comments