MCPcopy
hub / github.com/pandas-dev/pandas / _ensure_matching_resos

Method _ensure_matching_resos

pandas/core/arrays/datetimelike.py:2074–2081  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

2072 # TODO: annotate other as DatetimeArray | TimedeltaArray | Timestamp | Timedelta
2073 # with the return type matching input type. TypeVar?
2074 def _ensure_matching_resos(self, other):
2075 if self._creso != other._creso:
2076 # Just as with Timestamp/Timedelta, we cast to the higher resolution
2077 if self._creso < other._creso:
2078 self = self.as_unit(other.unit)
2079 else:
2080 other = other.as_unit(self.unit)
2081 return self, other
2082
2083 # --------------------------------------------------------------
2084

Callers 8

_factorize_keysFunction · 0.80
equalsMethod · 0.80

Calls 1

as_unitMethod · 0.95

Tested by

no test coverage detected