Skip to content

Commit d0c2e8d

Browse files
committed
BUG: adds stacklevel to warning call
1 parent 1343b2e commit d0c2e8d

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
@@ -3278,7 +3278,8 @@ def __setattr__(self, name, value):
32783278
warnings.warn("Pandas doesn't allow Series to be assigned "
32793279
"into nonexistent columns - see "
32803280
"https://pandas.pydata.org/pandas-docs/"
3281-
"stable/indexing.html#attribute-access")
3281+
"stable/indexing.html#attribute-access",
3282+
stacklevel=2)
32823283
object.__setattr__(self, name, value)
32833284

32843285
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)