Skip to content

Commit

Permalink
moved _is_homogeneous to Frame
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneding committed May 20, 2021
1 parent 17d7ab3 commit 15ced45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 0 additions & 9 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,15 +602,6 @@ def deserialize(cls, header, frames):

return cls(dict(zip(column_names, columns)), index=index)

@property
def _is_homogeneous(self):
# make sure that the dataframe has columns
if not self._data.columns:
return True

first_type = self._data.columns[0].dtype
return all(x.dtype == first_type for x in self._data.columns)

@property
def dtypes(self):
"""
Expand Down
9 changes: 9 additions & 0 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@ def size(self):
"""
return self._num_columns * self._num_rows

@property
def _is_homogeneous(self):
# make sure that the dataframe has columns
if not self._data.columns:
return True

first_type = self._data.columns[0].dtype
return all(x.dtype == first_type for x in self._data.columns)

@property
def empty(self):
"""
Expand Down

0 comments on commit 15ced45

Please sign in to comment.