Skip to content

Commit 80547eb

Browse files
committed
Move warning out of loop
1 parent a3ea6fc commit 80547eb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandas/core/strings.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -2024,12 +2024,11 @@ def _get_series_list(self, others, ignore_index=False):
20242024
los = los + nxt
20252025
join_warn = join_warn or wnx
20262026

2027-
if depr_warn:
2028-
warnings.warn('list-likes other than Series, Index, '
2029-
'or np.ndarray WITHIN another list-like '
2030-
'are deprecated and will be removed in '
2031-
'a future version.',
2032-
FutureWarning, stacklevel=3)
2027+
if depr_warn:
2028+
warnings.warn('list-likes other than Series, Index, or '
2029+
'np.ndarray WITHIN another list-like are '
2030+
'deprecated and will be removed in a future '
2031+
'version.', FutureWarning, stacklevel=3)
20332032
return (los, join_warn)
20342033
elif all(not is_list_like(x) for x in others):
20352034
return ([Series(others, index=idx)], False)

0 commit comments

Comments
 (0)