Skip to content

Preserve names of column object in various APIs - #13772

Merged
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-23.10from
galipremsagar:preserve_column_names
Jul 28, 2023
Merged

Preserve names of column object in various APIs#13772
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-23.10from
galipremsagar:preserve_column_names

Conversation

@galipremsagar

Copy link
Copy Markdown
Contributor

Description

This PR preserves column names in various APIs by retaining self._data._level_names and also calculating when to preserve the column names.
Fixes: #13741, #13740

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar added bug Something isn't working 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. 4 - Needs cuDF (Python) Reviewer non-breaking Non-breaking change labels Jul 26, 2023
@galipremsagar galipremsagar self-assigned this Jul 26, 2023
@galipremsagar
galipremsagar requested a review from a team as a code owner July 26, 2023 21:42
@galipremsagar galipremsagar changed the title Preserve column names in various APIs Preserve names of columns in various APIs Jul 26, 2023
@galipremsagar galipremsagar changed the title Preserve names of columns in various APIs Preserve names of column object in various APIs Jul 26, 2023
Comment thread python/cudf/cudf/core/dataframe.py
Comment thread python/cudf/cudf/tests/test_dataframe.py Outdated

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small comments but nothing blocking. LGTM!

Comment thread python/cudf/cudf/core/indexed_frame.py Outdated
Comment thread python/cudf/cudf/tests/test_dataframe.py Outdated
Comment thread python/cudf/cudf/tests/test_dataframe.py Outdated
@galipremsagar
galipremsagar requested a review from shwina July 28, 2023 15:05
@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team 4 - Needs cuDF (Python) Reviewer labels Jul 28, 2023

@wence- wence- left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment, but I think this makes sense.

Although, the index alignment is pretty hairy...

Comment thread python/cudf/cudf/core/indexed_frame.py Outdated
Comment thread python/cudf/cudf/core/dataframe.py
@galipremsagar

Copy link
Copy Markdown
Contributor Author

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Constructing a DataFrame with a multi-level column does not work

5 participants