librasteve / raku-Dan-Polars

Raku Polars binding
Artistic License 2.0
5 stars 2 forks source link

Align to Dan-actions (v1.1) #1

Closed librasteve closed 2 years ago

librasteve commented 2 years ago

12:41 < discord-raku-bot> <Anton Antonov#7232> <@928301352029937715> Sounds good. To be more concrete, my proposal is to make another, Dan-actions file here: https://github.com/antononcube/Raku-DSL-English-DataQueryWorkflows/tree/master/lib/DSL/English/DataQueryWorkflows/Actions/Raku

librasteve commented 2 years ago

hi @antononcube - I am making progress with this module and would like to start thinking about how it can serve your Raku-DSL needs. I am struggling to get this https://antononcube.shinyapps.io/DSL-evaluations/#section-main to produce any code ... it would be really helpful to me to see the generated code and compare to the source files!

I wonder if the shinyapps site is just quite slow and I am not sure what to do - should I do (i) cut and paste from example to main, (ii) choose Grammars / from English / to Python and (iii) hit submit?

antononcube commented 2 years ago

@p6steve I am not sure that might be the reason. I get code generate quickly enough.

A few suggestions:

> ToDataQueryWorkflowCode Raku 'use the data table $dfTemp; group by Var1; show counts; ungroup; rename Var1 as VAR01'
# $obj = $dfTemp ;
# $obj = group-by( $obj, "Var1") ;
# say "counts: ", $obj>>.elems ;
# $obj = $obj.values.reduce( -> $x, $y { [|$x, |$y] } ) ;
# $obj = rename-columns( $obj, %("Var1" => "VAR01") )
librasteve commented 2 years ago

Aha - thanks! OK now - I was missing the DSL MODULE DataQuery; line