Skip to content

Commit

Permalink
Fix copy creation of a columnAccessor (#14551)
Browse files Browse the repository at this point in the history
This PR fixes a copy creation in ColumnAccessor by properly passing the rangeindex and label_dtype to it's newly constructed object.
  • Loading branch information
galipremsagar authored Dec 5, 2023
1 parent c51444f commit e04b88b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/cudf/cudf/core/column_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,15 @@ def copy(self, deep=False) -> ColumnAccessor:
{k: v.copy(deep=deep) for k, v in self._data.items()},
multiindex=self.multiindex,
level_names=self.level_names,
rangeindex=self.rangeindex,
label_dtype=self.label_dtype,
)
return self.__class__(
self._data.copy(),
multiindex=self.multiindex,
level_names=self.level_names,
rangeindex=self.rangeindex,
label_dtype=self.label_dtype,
)

def select_by_label(self, key: Any) -> ColumnAccessor:
Expand Down

0 comments on commit e04b88b

Please sign in to comment.