Skip to content

Commit 2b958d4

Browse files
authored
CLN: remove values_from_object (#32715)
1 parent 95cd98b commit 2b958d4

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

pandas/_libs/lib.pyx

-14
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,6 @@ cdef:
9494
float64_t NaN = <float64_t>np.NaN
9595

9696

97-
def values_from_object(obj: object):
98-
"""
99-
Return my values or the object if we are say an ndarray.
100-
"""
101-
func: object
102-
103-
func = getattr(obj, '_internal_get_values', None)
104-
if func is not None:
105-
# Includes DataFrame, for which we get frame.values
106-
obj = func()
107-
108-
return obj
109-
110-
11197
@cython.wraparound(False)
11298
@cython.boundscheck(False)
11399
def memory_usage_of_objects(arr: object[:]) -> int64_t:

pandas/core/common.py

-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ def maybe_box_datetimelike(value, dtype=None):
8787
return value
8888

8989

90-
values_from_object = lib.values_from_object
91-
92-
9390
def is_bool_indexer(key: Any) -> bool:
9491
"""
9592
Check whether `key` is a valid boolean indexer.

pandas/core/computation/expressions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ def _evaluate_numexpr(op, op_str, a, b):
121121

122122

123123
def _where_standard(cond, a, b):
124-
# Caller is responsible for calling values_from_object if necessary
124+
# Caller is responsible for extracting ndarray if necessary
125125
return np.where(cond, a, b)
126126

127127

128128
def _where_numexpr(cond, a, b):
129-
# Caller is responsible for calling values_from_object if necessary
129+
# Caller is responsible for extracting ndarray if necessary
130130
result = None
131131

132132
if _can_use_numexpr(None, "where", a, b, "where"):

0 commit comments

Comments
 (0)