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
Describe the bug The DataFrame.rank() method ignores the axis option and ranks always along axis=0.
axis
Steps/Code to reproduce bug
import cudf import numpy as np gdf = cudf.DataFrame(data={'A': [4, 2, 4, 8, np.nan], 'B':[5,4,3,2,1]}) gdf.rank(axis=1)
This gives
Expected behavior
Rank along columns when axis=1 is specified. Here is the expected output produced by pandas
import pandas as pd df = pd.DataFrame(data={'A': [4, 2, 4, 8, np.nan], 'B':[5,4,3,2,1]}) df.rank(axis=1)
Prints:
Environment overview
Tested with 0.20 nightly docker image (rapidsai/rapidsai-core-dev-nightly:0.20-cuda11.2-devel-ubuntu18.04-py3.8).
Additional context The ranking method is used by cheminformatics
The text was updated successfully, but these errors were encountered:
Thanks for filing this @tfeher -- this exactly the describes the bug as I initially identified it.
Sorry, something went wrong.
We should at least be throwing for now that we don't yet support axis=1.
axis=1
NotImplementedError
rank
Raise NotImplementedError for axis=1 in rank (#8347)
e598361
Fixes: #8212 This PR raises an informative error when axis is not `0`/`index`. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Keith Kraus (https://github.com/kkraus14) URL: #8347
galipremsagar
Successfully merging a pull request may close this issue.
Describe the bug
The DataFrame.rank() method ignores the
axis
option and ranks always along axis=0.Steps/Code to reproduce bug
This gives
Expected behavior
Rank along columns when axis=1 is specified. Here is the expected output produced by pandas
Prints:
Environment overview
Tested with 0.20 nightly docker image (rapidsai/rapidsai-core-dev-nightly:0.20-cuda11.2-devel-ubuntu18.04-py3.8).
Additional context
The ranking method is used by cheminformatics
The text was updated successfully, but these errors were encountered: