Skip to content

Commit

Permalink
deprecate default args as positional in set_axis
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed May 15, 2021
1 parent 0d49452 commit e1b393f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pandas/tests/frame/methods/test_set_axis.py
Expand Up @@ -109,3 +109,11 @@ def test_nonkeyword_arguments_deprecation_warning():
)
with tm.assert_produces_warning(FutureWarning, match=msg):
df.set_axis([1, 2, 4], False)

ser = Series([1, 2, 3])
msg = (
r"Starting with Pandas version 2\.0 all arguments of set_axis except for the "
r"arguments 'self' and 'labels' will be keyword-only"
)
with tm.assert_produces_warning(FutureWarning, match=msg):
ser.set_axis([1, 2, 4], False)

0 comments on commit e1b393f

Please sign in to comment.