-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
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
feat(rust!,python): Add Series.cat.uses_lexical_ordering
#10325
Conversation
Why not just |
That makes sense with the current API, though I don't like having to check the result versus a string, when I know there are only two options. It's both inefficient and easy to mess up. We should probably change I think I'll just slap an "experimental" tag on this for now and merge it as-is. We can revisit later. |
@ritchie46 I chose a slightly different name / renamed related functionality on the Rust side. Are you OK with this? |
Series.cat.uses_lexical_sort
Series.cat.uses_lexical_ordering
Series.cat.uses_lexical_ordering
Series.cat.uses_lexical_ordering
Yeap. |
Closes #5671, supersedes #5705, blocker for #10267
I didn't want to rebase the existing PR, so here's a fresh PR.
WARNING: This functionality is considered experimental for now.
Changes:
set_lexical_sorted
toset_lexical_ordering
.LEXICAL_SORT
toLEXICAL_ORDERING
.use_lexical_sort
touses_lexical_ordering
and make it public outside the crateuses_lexical_ordering
method for categorical Series.I am really looking for a better name for this method, but I'm struggling to come up with something good. Help is appreciated!I initially thought-> Chose a sensible name for now and marked as experimental.is_ordered
would be appropriate. That would be the reverse of this - an ordered categorical sorts by physical type rather than lexical.