machow / siuba

Python library for using dplyr like syntax with pandas and SQL
https://siuba.org
MIT License
1.14k stars 48 forks source link

Feat across #452

Closed machow closed 1 year ago

machow commented 1 year ago

This PR implements the across() bridge function, across all verbs except arrange() (for now). It also refactors sql verb implementations, cleaning up and consolidating their logic.

Note that this PR introduces context variables (similar to dplyr). This is because across() needs access to the original sql LazyTbl in order to translate its functions into their dialect specific implementations. Currently, two context variables are set -- one for the LazyTbl, and one to indicate whether or not to use a windowed or agg translation. This should be cleaned u up in the future.

All-in-all, the following changes were made:

.

.