-
Notifications
You must be signed in to change notification settings - Fork 914
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
[BUG] Cannot assign DataFrame.column.name #14012
Comments
@mroeschke Is the example you provided for a different issue? Or were you referring to this: In [37]: df = cudf.DataFrame({"a": [1., 2.]})
In [38]: df
Out[38]:
a
0 1.0
1 2.0
In [39]: df.columns.name = "baz"
In [40]: df
Out[40]:
a
0 1.0
1 2.0
In [41]: df.columns
Out[41]: Index(['a'], dtype='object')
.
.
. |
Ah yes my example in the OP is incorrect. Yeah I think the core issue is that |
@galipremsagar is there a reason why
|
I believe it is because most operations involving column names occur on the host, not on device. Storing the column names in a cudf Index would require constant H2D copies. @shwina may be able to provide more of the history here, but I do agree that this choice can sometimes cause confusion and make certain aspects of implementation harder. |
Fixes: #17482, #14012 This PR fixes a long-standing issue where modifying `columns` `name` never propagates to the parent object. This PR fixes this issue by making `to_pandas_index` a cached-property and accessing it's names if this property was ever invoked in `level_names` property. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Matthew Roeschke (https://github.com/mroeschke) URL: #17597
resolved in #17597 |
Describe the bug
DataFrame.pop removes column name
Steps/Code to reproduce bug
Expected behavior
Environment overview (please complete the following information)
docker pull
&docker run
commands usedEnvironment details
Please run and paste the output of the
cudf/print_env.sh
script here, to gather any other relevant environment detailsAdditional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: