def numerics(data): return pd.Series(data.apply(sensitive_numerics)) ############################################# Test ################################################## # Texts = ['1231451469', '42.2', '123 145 1469', '123.145.1469', '(123) 145.1469', '(123) 145 1469', # '(123) 145–1469', '123–145–1469', '+1(123) 145–1469 ', '1234567890999111', '123HELLO56', # '-123', '04/04/1998', 'it’s015–96–0342 you know my number call me', '+123–145–1469', # '48236–123', 'I live close to (42.293564, -83.638916)', '123-4-5648', '1-234-5-6789'] # data = pd.Series(Texts) # print(numerics(data))