You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is indeed expected. By default DataFrames.transform "ungroups" he data after the transformation. Fixing #179 to allow keyword arguments is the solution. Eventually it would be nice to do
@transform(m = sum(:b); ungroup = false)
which would allow grouping to be preserved in the pipe.
Hi,
Apparently @combine seems to provide an unexpected result when used in a @> pipe after a transform.
Please review the following test:
`using DataFrames, DataFramesMeta
using Lazy: @>
df = DataFrame(a = [1, 1, 2, 2], b = [1, 3, 8, 10])
@> begin
groupby(df, :a)
#@Transform(c = :b.+1)
@combine(m=sum(:b))
end`
which correctly returns
2×2 DataFrame │ Row │ a │ m │ │ 1 │ 1 │ 4 │ │ 2 │ 2 │ 18 │
while uncommenting the @Transform the groups are lost and the entire block returns a single row
1×1 DataFrame │ Row │ m │ │ 1 │ 22 │
Is this expected? the workaround would be using 'by' instead of 'combine'
The text was updated successfully, but these errors were encountered: