Skip to content

Commit 0057702

Browse files
committed
just replace error message
1 parent 3bee5d7 commit 0057702

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pandas/core/strings.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -2345,14 +2345,7 @@ def _legal_dtype(series):
23452345
# no NaNs - can just concatenate
23462346
result = cat_core(all_cols, sep)
23472347
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
2348+
raise TypeError(err_wrong_dtype)
23562349

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

0 commit comments

Comments
 (0)