-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: bug in group by rank string #21554
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
Comments
Lexicographcal ranking is not supported, hence the Error with groupby. IIRC there is an issue already to make that consistent across GroupBy and Series objects |
Here's the original issue - #19560. Looks like there's a PR referenced there that hasn't been updated in a couple months, so if you are interested can reach out to the author and try to push over the finish line. Closing this issue specifically as it is a duplicate |
@WillAyd Thanks very much. |
I'm having the exact same issue as @xinai57 has, after upgrading the pandas version to v0.23. |
Out of curiosity what's the reasoning behind removing the ability for lexicographic ranking? |
你好,我也遇到了同样的问题,df.groupby("key")["value_int"].rank(),这句话的意思是不是把key这一列按照value_int这一列的数值大小进行排序?如果是这样,字符串应该不能排序吧,是不是只支持数字排序? |
Bug description
when groupby "key" and rank "value_str", error presents
but, if group by "key" and rank "value_int", the error doesn't present:
if we just rank "value_str", the error dosen't present either:
The text was updated successfully, but these errors were encountered: