-
Notifications
You must be signed in to change notification settings - Fork 590
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
ENH: Implement array ops for pandas #1100
Conversation
|
@jreback can you review this when you get a chance? |
|
Going to pull out the conftest addition and timezone parameterized fixture refactor into a separate PR. |
05ab434
to
fc12974
Compare
| @@ -740,6 +741,9 @@ class MultiQuantile(Quantile): | |||
| name='interpolation', | |||
| default='linear')] | |||
|
|
|||
| def output_type(self): | |||
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.
maybe should consolidate all of the helper routines somewhere
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 think most of these are operation specific so I don't know if there's any consolidation possible here.
| @@ -2403,9 +2407,9 @@ class ArraySlice(ValueOp): | |||
| input_type = [ | |||
| rules.array(dt.any), | |||
| rules.integer(name='start'), | |||
| rules.integer(name='stop') | |||
| rules.integer(name='stop', optional=True) | |||
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.
step?
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.
step isn't supported yet. We could make the translation specific to the backend and have the translation rules raise for SQL backends and have pandas work. I'll make an issue.
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.
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.
The downside to this approach is that you don't get a failure at expression creation time, instead you get a failure at compile time.
| raise ValueError( | ||
| 'Array value type must be a primitive type ' | ||
| '(e.g., number, string, or timestamp)' | ||
| ) |
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.
isn't this just .astype()? or is this basically np.array(ibis_expr)?
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.
No, because we're casting the elements of each list in the Series to a different value type.
fc12974
to
3bb4e80
Compare
3bb4e80
to
256ad7a
Compare
|
@jreback Ok to merge on green? |
|
yep lgtm. |
Closes #1099