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
I just noticed that when groupby and then combine are used, the order of columns changes. I think it is a reasonable behavior, but I think it would be good to point out with a "warning" in the doc. This can lead to unexpected behavior in some cases.
Julia version: 1.9.3
DataFrames version: 1.5.0
Example:
df =DataFrame(A =1:4, B = ["M", "F", "F", "M"])
df =combine(first, groupby(df, :B))
for (Bval, Aval) ineachrow(df) # I expect here (Aval, Bval) without seeing any warning in the docprintln("Col B value is:", Bval, "\tCol A value is:", Aval)
end
The text was updated successfully, but these errors were encountered:
Technically the order of columns is not changed (the point is that the columns not specified for grouping are dropped). However, indeed we could add a sentence that if keepkeys=true then in combine grouping columns are put first and are followed by results of the aggregation as I think it is missing.
Hi all,
I just noticed that when groupby and then combine are used, the order of columns changes. I think it is a reasonable behavior, but I think it would be good to point out with a "warning" in the doc. This can lead to unexpected behavior in some cases.
Julia version: 1.9.3
DataFrames version: 1.5.0
Example:
The text was updated successfully, but these errors were encountered: