Skip to content

Commit

Permalink
CLN: Deprecate non-keyword arguments in concat pandas-dev#41485
Browse files Browse the repository at this point in the history
  • Loading branch information
tegardp committed May 29, 2021
1 parent 768c521 commit 6d0ae9c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pandas/tests/reshape/concat/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,16 +642,15 @@ def test_concat_multiindex_with_empty_rangeindex():

def test_concat_posargs_deprecation(all_parsers):
# https://github.com/pandas-dev/pandas/issues/41485
df = pd.DataFrame([[1,2,3]], index=["a"])
df2 = pd.DataFrame([[4,5,6]], index=["b"])
df = pd.DataFrame([[1, 2, 3]], index=["a"])
df2 = pd.DataFrame([[4, 5, 6]], index=["b"])

msg = (
"In a future version of pandas all arguments of concat"
"except for the argument 'objs' will be keyword-only"
)
with tm.assert_produces_warning(FutureWarning, match=msg):
result = concat([df, df2], " ")
expected = DataFrame([[1,2,3],[4,5,6]], index=["a","b"])
result = concat([df, df2], " ")
expected = DataFrame([[1, 2, 3],[4, 5, 6]], index=["a", "b"])
tm.assert_frame_equal(result, expected)


0 comments on commit 6d0ae9c

Please sign in to comment.