Skip to content
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

Return FrozenList for Index.names #16047

Merged
merged 4 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/_base_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ def deserialize(cls, header, frames):
@property
def names(self):
"""
Returns a tuple containing the name of the Index.
Returns a FrozenList containing the name of the Index.
"""
return (self.name,)
return pd.core.indexes.frozen.FrozenList([self.name])

@names.setter
def names(self, values):
Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/dask_cudf/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def read_partition(

if index and (index[0] in df.columns):
df = df.set_index(index[0])
elif index is False and df.index.names != (None,):
elif index is False and df.index.names != [None]:
# If index=False, we shouldn't have a named index
df.reset_index(inplace=True)

Expand Down
Loading