-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DEPR: Deprecated passing arguments as positional in pd.concat #41718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPR: Deprecated passing arguments as positional in pd.concat #41718
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, thanks! Can you drop the commits from the read_table
PR here?
can you rebase; this appears to have a read_table change (already merged) so need to remove that |
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"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pandas/tests/reshape/concat/test_concat.py:645:10: PDF019 found both 'pd.DataFrame' and 'DataFrame' in the same file
pandas/tests/reshape/concat/test_concat.py:646:11: PDF019 found both 'pd.DataFrame' and 'DataFrame' in the same file
@tegardp if you can update |
sorry i'm still confused about rebase workflow |
that is now sorted in d9b3712, comments #41718 (comment) and #41718 (comment) to be addressed. will fix test and lint failures on ci |
tests are still failing... see #41718 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great ping on green
you need to change any existing test which uses positional args to avoid the warnings. |
"except for the argument 'objs' will be keyword-only" | ||
) | ||
warning_ctx = tm.assert_produces_warning(FutureWarning, match=warn_msg) | ||
with pytest.raises(TypeError, match=err_msg), warning_ctx: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we deprecate, python will raise TypeError: concat() takes 1 positional argument but 2 were given
before the function validates the first argument.
maybe concat(df1, df2)
-> concat(df1)
…ate-nonkeyword-args-concat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tegardp and @MarcoGorelli lgtm
ci failures are codecov failed uploads.
thanks @tegardp |
inplace
#41485