3 ms·
This is just tidyr ?
by heywhatupboys 3y ago
This is just tidyr ?
- aerzen 3y agoIn a way, yes.
- snthpy 3y agoKind of. dplyr, Pandas, LINQ, Kusto, etc... are big inspirations. The fact that these are so popular and have reinvented the same workflows with slightly different syntaxes to me is a sign that they capture something fundamental about how humans like to think about data transformations. PRQL is indeed very close to dplyr. In my (biased) opinion, PRQL is actually a bit cleaner than dplyr because it is its own language and doesn't have to work as DSL inside R. The same goes for comparisons with Pandas and Polars having to work as DSLs inside Python. Compare from mtcars filter cyl > 6 select {cyl, mpg} sort {-mpg} with mtcars %>% filter(cyl > 6) %>% select(cyl, mpg) %>% arrange(dplyr::desc(mpg)) Incidentally, I produced the dplyr code from the PRQL with ```R install.packages("prqlr", repos = "https://eitsupi.r-universe.dev", lib="~/.local/R_libs/") library(prqlr, lib.loc="~/.local/R_libs/") library("tidyquery") " from mtcars filter cyl > 6 select {cyl, mpg} sort {-mpg} " |> prql_to_sql() |> tidyquery::show_dplyr() ``` (Disclaimer: I'm a PRQL contributor.)