#NEWLINE# @ Substitution ( klass = 'DatetimeIndex' , value = 'key' ) #NEWLINE# @ Appender ( _shared_docs [ 'searchsorted' ] ) #NEWLINE# def searchsorted( self , key , side = 'left' , sorter = None ) : #NEWLINE# #INDENT# if isinstance ( key , ( np . ndarray , Index ) ) : #NEWLINE# #INDENT# key = np . array ( key , dtype = _NS_DTYPE , copy = False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# key = _to_m8 ( key , tz = self . tz ) #NEWLINE# #UNINDENT# return self . values . searchsorted ( key , side = side )