Skip to content

Commit e1b393f

Browse files
committed
deprecate default args as positional in set_axis
1 parent 0d49452 commit e1b393f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/frame/methods/test_set_axis.py

+8
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,11 @@ def test_nonkeyword_arguments_deprecation_warning():
109109
)
110110
with tm.assert_produces_warning(FutureWarning, match=msg):
111111
df.set_axis([1, 2, 4], False)
112+
113+
ser = Series([1, 2, 3])
114+
msg = (
115+
r"Starting with Pandas version 2\.0 all arguments of set_axis except for the "
116+
r"arguments 'self' and 'labels' will be keyword-only"
117+
)
118+
with tm.assert_produces_warning(FutureWarning, match=msg):
119+
ser.set_axis([1, 2, 4], False)

0 commit comments

Comments
 (0)