I'm looking to sort a dataframe by a column, and when the values are equal shuffle them. In small-scale tests using sortperm(column_values, lt = (a, b) -> a < b || (a == b && rand() < 0.5))
seemed to work, but with longer lists of values it seems you can get segfaults (ref: https://github.com/JuliaLang/julia/issues/44698).
Might someone have advice on how I can accomplish this without segfaulting?
Ah, it looks like I can use that lt
function if I set alg=MergeSort
.
Timothy has marked this topic as resolved.
Last updated: Dec 28 2024 at 04:38 UTC