Skip to content

Commit

Permalink
Implement hash function in ListDtype
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Jan 6, 2021
1 parent 15ad905 commit bdc5c21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions python/cudf/cudf/core/column/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ def to_arrow(self):
pa_type, len(self), buffers, children=[elements]
)

def to_pandas(self, index=None, nullable=False, **kwargs):
pd_series = self.to_arrow().to_pandas(**kwargs)

if index is not None:
pd_series.index = index
return pd_series

def set_base_data(self, value):
if value is not None:
raise RuntimeError(
Expand Down
3 changes: 3 additions & 0 deletions python/cudf/cudf/core/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ def __repr__(self):
else:
return f"ListDtype({self.element_type})"

def __hash__(self):
return id(self)


class StructDtype(ExtensionDtype):

Expand Down

0 comments on commit bdc5c21

Please sign in to comment.