Skip to content

Commit bfb9f93

Browse files
committed
BUG: adds stacklevel to warning call
1 parent f485e77 commit bfb9f93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/generic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3361,7 +3361,8 @@ def __setattr__(self, name, value):
33613361
warnings.warn("Pandas doesn't allow Series to be assigned "
33623362
"into nonexistent columns - see "
33633363
"https://pandas.pydata.org/pandas-docs/"
3364-
"stable/indexing.html#attribute-access")
3364+
"stable/indexing.html#attribute-access",
3365+
stacklevel=2)
33653366
object.__setattr__(self, name, value)
33663367

33673368
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)