Skip to content

Commit

Permalink
Remove code handling multiindex keys for now
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- committed Jul 18, 2023
1 parent 7dc2536 commit c5f8eb4
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions python/cudf/cudf/core/indexing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
is_bool_dtype,
is_integer,
is_integer_dtype,
is_scalar,
)
from cudf.core.column_accessor import ColumnAccessor
from cudf.core.copy_types import BooleanMask, GatherMap
Expand Down Expand Up @@ -316,26 +315,6 @@ def destructure_loc_key(
IndexError
If there are too many indexers.
"""
if (
isinstance(frame.index, cudf.MultiIndex)
and len(frame.shape) == 2
and isinstance(key, tuple)
and all(map(is_scalar, key))
):
# This is "best-effort" and ambiguous
if len(key) == 2:
if key[1] in frame.index._columns[1]:
# key just indexes the rows
key = (key,)
elif key[1] in frame._data:
# key indexes rows and columns
key = key
else:
# key indexes rows and we will raise a keyerror
key = (key,)
else:
# key just indexes rows
key = (key,)
return expand_key(key, frame)


Expand Down

0 comments on commit c5f8eb4

Please sign in to comment.