Skip to content

multi calc outputs (reuse file IO) #2149

Answered by jqnatividad
tooptoop4 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @tooptoop4 ,
Yes you can, with the luau command.

qsv/src/cmd/luau.rs

Lines 50 to 51 in 97b56c9

Map multiple new columns in one pass
$ qsv luau map newcol1,newcol2,newcol3 "{cola + 1, colb + 2, colc + 3}"

And you can even have a full blown luau script:

qsv/tests/test_luau.rs

Lines 1608 to 1696 in 97b56c9

#[test]
fn luau_aggregation_with_embedded_begin_end_using_file_random_access_multiple_columns() {
let wrk = Workdir::new("luau_embedded_multiple_columns");
wrk.create_indexed(
"data.csv",
vec![
svec!["letter", "Amount"],
svec!["a", "13"],
svec!["b", "24"],
svec!["c", "72"],
svec!["d", "7"],
],

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jqnatividad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants