timsaucer opened a new pull request, #1215: URL: https://github.com/apache/datafusion-python/pull/1215
# Which issue does this PR close? This is a user request but no issue was opened. # Rationale for this change With this you can do slicing of arrays via expression. For example, suppose you have this data frame: ``` +----------------------+ | a | +----------------------+ | [1.0, 2.0, 3.0, 3.0] | | [4.0, 5.0, 3.0] | | [6.0] | +----------------------+ ``` You could do `df.with_column("a[1:3]", column("a")[1:3])` to get ``` +----------------------+------------+ | a | a[1:3] | +----------------------+------------+ | [1.0, 2.0, 3.0, 3.0] | [2.0, 3.0] | | [4.0, 5.0, 3.0] | [5.0, 3.0] | | [6.0] | [] | +----------------------+------------+ ``` # What changes are included in this PR? Updates `__getitem__` to take slice. Adds unit tests. # Are there any user-facing changes? No -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org