Skip to content

Commit a315a92

Browse files
committed
Removed group_rank_object
1 parent caacef2 commit a315a92

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

pandas/_libs/groupby.pyx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,6 @@ def group_last_object(ndarray[object, ndim=2] out,
130130
out[i, j] = resx[i, j]
131131

132132

133-
def group_rank_object(ndarray[float64_t, ndim=2] out,
134-
ndarray[object, ndim=2] values,
135-
ndarray[int64_t] labels,
136-
bint is_datetimelike, object ties_method,
137-
bint ascending, bint pct, object na_option):
138-
raise ValueError("rank not supported for object dtypes")
139-
140-
141133
cdef inline float64_t median_linear(float64_t* a, int n) nogil:
142134
cdef int i, j, na_count = 0
143135
cdef float64_t result

pandas/tests/groupby/test_groupby.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,8 +2038,7 @@ def test_rank_args_missing(self, grps, vals, ties_method, ascending,
20382038
def test_rank_object_raises(self, ties_method, ascending, na_option,
20392039
pct, vals):
20402040
df = DataFrame({'key': ['foo'] * 5, 'val': vals})
2041-
with tm.assert_raises_regex(ValueError,
2042-
"rank not supported for object dtypes"):
2041+
with tm.assert_raises_regex(TypeError, "not callable"):
20432042
df.groupby('key').rank(method=ties_method,
20442043
ascending=ascending,
20452044
na_option=na_option, pct=pct)

0 commit comments

Comments
 (0)