How to get columns and change their names in a pyrrow compute expression. #48927
davlee1972
started this conversation in
General
Replies: 1 comment
-
|
you probably want to use something like acero (substrait) to do what you want. I can try and figure out how to do it, I don't know it off the top of my head. docs here (I think): https://arrow.apache.org/docs/python/api/acero.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is a sample pyarrow compute expression used for filtering data:
My odd use case is that I need to modify the expression to:
Some of my files have lower case column names and some files use upper case column names. I know which files are upper case vs lower case so I need to take a pyarrow compute expression using lower case column names including nested columns in nested conditions and rewrite the expression with all upper case column names.
Is there any way to create something like an abstract syntax tree to get all possible column names and reconstruct the expression with all upper case column names?
Beta Was this translation helpful? Give feedback.
All reactions