-
Notifications
You must be signed in to change notification settings - Fork 117
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
[IR] Steel-thread example for pandas iloc get #1727
[IR] Steel-thread example for pandas iloc get #1727
Conversation
…ained in Df and series
7ed61e9
to
7445b0d
Compare
This now looks complete – just needs a test in tests/ast. |
columns=["A", "B", "C", "D", "E", "F", "G"], | ||
) | ||
result = df.iloc[2, 2] | ||
print(result) |
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 test fails right now - I am not sure how to display result
. It does not produce any other output.
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.
Does it work with the main branch? I assume you're running without Phase 1 enabled?
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.
LG; some minor nits. The change request is about the AST test.
@@ -158,6 +159,11 @@ def __init__( | |||
|
|||
self._siblings = [] | |||
|
|||
if not ast_stmt: |
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.
In column.py we're using if ... is None; we should use a consistent pattern for this check – whatever is the canonical approach in Python. It seems that is None
makes more sense?
@@ -158,6 +159,11 @@ def __init__( | |||
|
|||
self._siblings = [] | |||
|
|||
if not ast_stmt: | |||
ast_stmt = pd.session._ast_batch.assign() |
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.
I don't really understand the point of creating an assign
node like this. If a statement isn't actually supplied, how a "default" one won't really work. Is this because of the way that Pandas interacts with this code?
|
||
## EXPECTED OUTPUT | ||
|
||
17 |
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.
Does this work? The test driver here runs the unparser, so we should be seeing something that looks like the original source.
columns=["A", "B", "C", "D", "E", "F", "G"], | ||
) | ||
result = df.iloc[2, 2] | ||
print(result) |
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.
Does it work with the main branch? I assume you're running without Phase 1 enabled?
…loc-get-steel-thread
…get-steel-thread' into vbudati/server-side-pandas-iloc-get-steel-thread
This is the steel-thread for Phase 0 pandas. The goal is to have iloc get working. I tried to cover all the basic row + columns cases but only test for scalar rows and columns.