def _to_m8(key): ''' Timestamp-like => dt64 ''' if not isinstance(key, datetime): # this also converts strings key = Timestamp(key) return np.int64(lib.pydt_to_i8(key)).view(_NS_DTYPE)
def _to_m8(key): ''' Timestamp-like => dt64 ''' if not isinstance(key, datetime): # this also converts strings key = Timestamp(key) return np.int64(lib.pydt_to_i8(key)).view(_NS_DTYPE)