Skip to content

Commit 4d9a956

Browse files
committed
CLN: raise correct error for Panel sort_values
1 parent ef487d9 commit 4d9a956

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/core/generic.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -2366,9 +2366,13 @@ def add_suffix(self, suffix):
23662366
1 A 1 1
23672367
"""
23682368

2369-
def sort_values(self, by, axis=0, ascending=True, inplace=False,
2370-
kind='quicksort', na_position='last'):
2371-
raise AbstractMethodError(self)
2369+
def sort_values(self):
2370+
"""
2371+
NOT IMPLEMENTED: do not call this method, as sorting values is not
2372+
supported for Panel objects and will raise an error.
2373+
"""
2374+
raise NotImplementedError("sort_values has not been implemented "
2375+
"on Panel or Panel4D objects.")
23722376

23732377
_shared_docs['sort_index'] = """
23742378
Sort object by labels (along an axis)

0 commit comments

Comments
 (0)