-
Notifications
You must be signed in to change notification settings - Fork 916
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
[FEA]use cuDF dataframe cannot use unstack() function #6694
Comments
@dominicshanshan Thanks for bringing this to our attention. This seems more like a feature request than a bug as the caught error states that this feature isn't implemented. Can you change the issue from a bug [BUG] to a feature request [FEA]?
It does seem like we didn't quite reach full equivalence to pandas as hoped for in the closed issue #1821. Should we reopen it @kkraus14? Following the pandas example from https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.unstack.html, Pandas attempt:
Successfully outputs
Outputs
|
@taureandyernv , as you request, changed label from BUG -> FEA |
This should be a workaround for now: >>> df = cudf.DataFrame({'B': [1, 3, 5],
... 'C': [2, 4, 6]})
>>> df.T.stack(dropna=False)
0 1
B 0 1
1 3
2 5
C 0 2
1 4
2 6
dtype: int64 Note that cudf requires all columns to have the same datatype to complete the transpose. Otherwise some type-casts may be needed. |
Closes #6694 When `unstack()` receives a dataframe with "single" index, returns a series to match pandas behavior. Authors: - Michael Wang <[email protected]> Approvers: - null URL: #7054
Describe the bug
cuDF dataframe not support .unstack() function
Steps/Code to reproduce bug
Expected behavior
Like pandas.DataFrame().unstack(), it should output the unstack table
Environment overview (please complete the following information)
docker pull
&docker run
commands usedsudo docker run --gpus all -it -v /data/project/demo/:/rapids/notebooks/demo/ -p 8889:8888 nvcr.io/nvidia/rapidsai/rapidsai:cuda11.0-runtime-ubuntu18.04
Please let me know if this is enough to reproduce the issue, thanks !
The text was updated successfully, but these errors were encountered: