def str_endswith(arr, pat, na=np.nan):
 f = (lambda x: x.endswith(pat))
 return _na_map(f, arr, na, dtype=bool)

def str_endswith ( arr , pat , na = np . nan ) : f = ( lambda x : x . endswith ( pat ) ) return _na_map ( f , arr , na , dtype = bool )
return boolean series indicating whether each string in the series/index ends with passed pattern .