Skip to content

Commit d1804f2

Browse files
committed
CLN: remove now unused _get_values_from_dict
1 parent 1ee3c3e commit d1804f2

File tree

3 files changed

+0
-40
lines changed

3 files changed

+0
-40
lines changed

pandas/core/indexes/base.py

-21
Original file line numberDiff line numberDiff line change
@@ -2822,27 +2822,6 @@ def get_indexer_for(self, target, **kwargs):
28222822
indexer, _ = self.get_indexer_non_unique(target, **kwargs)
28232823
return indexer
28242824

2825-
_index_shared_docs['_get_values_from_dict'] = """
2826-
Return the values of the input dictionary in the order the keys are
2827-
in the index. np.nan is returned for index values not in the
2828-
dictionary.
2829-
2830-
Parameters
2831-
----------
2832-
data : dict
2833-
The dictionary from which to extract the values
2834-
2835-
Returns
2836-
-------
2837-
np.array
2838-
2839-
"""
2840-
2841-
@Appender(_index_shared_docs['_get_values_from_dict'])
2842-
def _get_values_from_dict(self, data):
2843-
return lib.fast_multiget(data, self.values,
2844-
default=np.nan)
2845-
28462825
def _maybe_promote(self, other):
28472826
# A hack, but it works
28482827
from pandas.core.indexes.datetimes import DatetimeIndex

pandas/core/indexes/datetimelike.py

-8
Original file line numberDiff line numberDiff line change
@@ -698,14 +698,6 @@ def __rsub__(self, other):
698698
def _add_delta(self, other):
699699
return NotImplemented
700700

701-
@Appender(_index_shared_docs['_get_values_from_dict'])
702-
def _get_values_from_dict(self, data):
703-
if len(data):
704-
return np.array([data.get(i, np.nan)
705-
for i in self.asobject.values])
706-
707-
return np.array([np.nan])
708-
709701
def _add_delta_td(self, other):
710702
# add a delta of a timedeltalike
711703
# return the i8 result view

pandas/core/indexes/datetimes.py

-11
Original file line numberDiff line numberDiff line change
@@ -1457,17 +1457,6 @@ def get_value_maybe_box(self, series, key):
14571457
key, tz=self.tz)
14581458
return _maybe_box(self, values, series, key)
14591459

1460-
@Appender(_index_shared_docs['_get_values_from_dict'])
1461-
def _get_values_from_dict(self, data):
1462-
if len(data):
1463-
# coerce back to datetime objects for lookup
1464-
data = com._dict_compat(data)
1465-
return lib.fast_multiget(data,
1466-
self.asobject.values,
1467-
default=np.nan)
1468-
1469-
return np.array([np.nan])
1470-
14711460
def get_loc(self, key, method=None, tolerance=None):
14721461
"""
14731462
Get integer location for requested label

0 commit comments

Comments
 (0)