-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: fix calling local references with keyword arguments in query #26426
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
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.
tests always are first
Codecov Report
@@ Coverage Diff @@
## master #26426 +/- ##
==========================================
- Coverage 91.74% 91.73% -0.01%
==========================================
Files 174 174
Lines 50748 50748
==========================================
- Hits 46557 46556 -1
- Misses 4191 4192 +1
Continue to review full report at Codecov.
|
running test_fast.bat produces many failed tests. However I can't find test_multi_line_expression_callable_local_variable in the output. Does this mean that this test is passed? |
@jreback |
""", inplace=True) | ||
assert_frame_equal(expected, df) | ||
assert ans is None | ||
|
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.
Split this test into two.
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.
@gfyoung
done
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.
add a whatsnew note; reshaping or other section would be ok
you will need to merge master as well, there is a conflict |
Th conflict is now resolved |
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.
need a different format for the issue number
doc/source/whatsnew/v0.25.0.rst
Outdated
@@ -380,6 +379,7 @@ Indexing | |||
- Bug in which :meth:`DataFrame.append` produced an erroneous warning indicating that a ``KeyError`` will be thrown in the future when the data to be appended contains new columns (:issue:`22252`). | |||
- Bug in which :meth:`DataFrame.to_csv` caused a segfault for a reindexed data frame, when the indices were single-level :class:`MultiIndex` (:issue:`26303`). | |||
- Fixed bug where assigning a :class:`arrays.PandasArray` to a :class:`pandas.core.frame.DataFrame` would raise error (:issue:`26390`) | |||
- Allow keyword arguments for callable local reference used in the :method:`DataFrame.query` string (PR 26426) |
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.
this needs to be like the other, e.g. (:issue:`26426`)
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.
Done. Thank you for the patience!
thanks for the patch @danielhrisca |
git diff upstream/master -u -- "*.py" | flake8 --diff
calling local references with keyword arguments in query fails with attribute error:
With the fix this works correctly