We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One should be able to sort the DataFrame by one or several of it's columns.
func (d DataFrame) Arrange(keys string...) DataFrame { ... }
A possible implementation could start by enabling each Series to return a []int array containing it's sorted order. For example:
a := Strings("b", "c", "a") var b []int = a.Order() // b == []int{2,3,1}
In case we have NA elements we should decide what to do with them. Maybe they all have the same order index and appear at the end?
a := Strings("b", nil, "c", nil,"a") var b []int = a.order() // b == []int{2,4,3,4,1}
In any case, once we have an []int array for each key column we could calculate the new row order array and use it to sort the DataFrame.
The text was updated successfully, but these errors were encountered:
DataFrame.Arrange and Series.Order are implemented as of 65850ab
DataFrame.Arrange
Series.Order
No matter the direction of ordering, NaN elements will always be sorted at the end.
Sorry, something went wrong.
No branches or pull requests
One should be able to sort the DataFrame by one or several of it's columns.
A possible implementation could start by enabling each Series to return a []int array containing it's sorted order. For example:
In case we have NA elements we should decide what to do with them. Maybe they all have the same order index and appear at the end?
In any case, once we have an []int array for each key column we could calculate the new row order array and use it to sort the DataFrame.
The text was updated successfully, but these errors were encountered: