Skip to content
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
10 changes: 4 additions & 6 deletions python/ray/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5027,9 +5027,8 @@ def loc(self):
We currently support: single label, list array, slice object
We do not support: boolean array, callable
"""
raise NotImplementedError(
"To contribute to Pandas on Ray, please visit "
"github.com/ray-project/ray.")
from .indexing import _Loc_Indexer
return _Loc_Indexer(self)

@property
def is_copy(self):
Expand All @@ -5054,9 +5053,8 @@ def iloc(self):
We currently support: single label, list array, slice object
We do not support: boolean array, callable
"""
raise NotImplementedError(
"To contribute to Pandas on Ray, please visit "
"github.com/ray-project/ray.")
from .indexing import _iLoc_Indexer
return _iLoc_Indexer(self)

def _copartition(self, other, new_index):
"""Colocates the values of other with this for certain operations.
Expand Down
10 changes: 10 additions & 0 deletions python/ray/dataframe/index_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,13 @@ def convert_to_index_sliceable(self, key):
key: slice to convert and check
"""
return convert_to_index_sliceable(self._coord_df, key)

def get_partition(self, partition_id):
"""Return a view of coord_df where partition = partition_id
"""
return self._coord_df[self._coord_df.partition == partition_id]

def sorted_index(self):
return (self._coord_df
.sort_values(['partition', 'index_within_partition'])
.index)
Loading