-
Is it possible to name the dynamically computed column in from datatable import dt, f, by
df = dt.Frame({"group1": ["A", "A", "B", "B", "A"],
"group2": [1, 0, 1, 1, 1],
"var1": [343, 345, 567, 345, 212]})
df[:, {"total":f.var1.sum()},by(f.group1=="A")] This returns
i.e. rather than df[, .("total" = sum(var1)), by=.(grpA = group1=="A")] |
Beta Was this translation helpful? Give feedback.
Answered by
samukweku
Dec 23, 2021
Replies: 1 comment 1 reply
-
There is a feature request for this; in one of the discussion threads, @st-pasha suggested the keyword |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lmullany
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a feature request for this; in one of the discussion threads, @st-pasha suggested the keyword
as
, similar to that in SQL. No implementation yet.