-
Notifications
You must be signed in to change notification settings - Fork 373
Open
Description
It would be nice if there was a function to sort rows by some function of an entire DataFrameRow instead of by individual column values. An example implementation would be:
function permuterows!(df::DataFrame, p)
for col in DataFrames._columns(df)
permute!(col, p)
end
return df
end
function sortrows!(df::DataFrame; kw...)
p = sortperm(eachrow(df); kw...)
permuterows!(df, p)
return df
end