diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index 6fc458cf2f478..f35f02de533e2 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -732,23 +732,13 @@ def _values(self) -> np.ndarray: vals = cast("CategoricalIndex", vals) vals = vals._data._internal_get_values() - is_dti = isinstance(vals, ABCDatetimeIndex) - - if is_dti: - # TODO: this can be removed after Timestamp.freq is removed - # The astype(object) below does not remove the freq from - # the underlying Timestamps so we remove it here to match - # the behavior of self._get_level_values - vals = algos.take_nd(vals, codes, fill_value=index._na_value) - if isinstance(vals.dtype, ExtensionDtype) or isinstance( vals, (ABCDatetimeIndex, ABCTimedeltaIndex) ): vals = vals.astype(object) vals = np.array(vals, copy=False) - if not is_dti: - vals = algos.take_nd(vals, codes, fill_value=index._na_value) + vals = algos.take_nd(vals, codes, fill_value=index._na_value) values.append(vals) arr = lib.fast_zip(values)