Skip to content

Commit 5442285

Browse files
committed
BUG: adds stacklevel to warning call
1 parent cfe1bad commit 5442285

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
@@ -3241,7 +3241,8 @@ def __setattr__(self, name, value):
32413241
warnings.warn("Pandas doesn't allow Series to be assigned "
32423242
"into nonexistent columns - see "
32433243
"https://pandas.pydata.org/pandas-docs/"
3244-
"stable/indexing.html#attribute-access")
3244+
"stable/indexing.html#attribute-access",
3245+
stacklevel=2)
32453246
object.__setattr__(self, name, value)
32463247

32473248
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)