Skip to content

Commit 1e88197

Browse files
authored
CLN: remove last getattr(arg, '_values', arg) usages (#44224)
1 parent 5f4057c commit 1e88197

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/indexes/category.py

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
@inherit_names(
5454
[
5555
"argsort",
56-
"_internal_get_values",
5756
"tolist",
5857
"codes",
5958
"categories",

pandas/core/tools/datetimes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
objects_to_datetime64ns,
7070
tz_to_dtype,
7171
)
72+
from pandas.core.construction import extract_array
7273
from pandas.core.indexes.base import Index
7374
from pandas.core.indexes.datetimes import DatetimeIndex
7475

@@ -516,7 +517,7 @@ def _to_datetime_with_unit(arg, unit, name, tz, errors: str) -> Index:
516517
"""
517518
to_datetime specalized to the case where a 'unit' is passed.
518519
"""
519-
arg = getattr(arg, "_values", arg) # TODO: extract_array
520+
arg = extract_array(arg, extract_numpy=True)
520521

521522
# GH#30050 pass an ndarray to tslib.array_with_unit_to_datetime
522523
# because it expects an ndarray argument

0 commit comments

Comments
 (0)