How to pass all the column from dataframe into different user defined function
here is mine dataframe look like
data = [['tom', 10, 9876765143, 'SUN 1023'], ['nick', 15, 98767654312, 'SUN 1023'], ['juli', 14, 98769876541, 'SUN 1023']]
df = pd.DataFrame(data, columns = ['Name', 'Age', 'Number', 'Address'])
df
here are function right now i am just showing one function
def number(inp):
import re
regex = r'^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$'
inp = inp.replace(regex, 'XXXXXXX')
print (inp)
number(df.Number)
It throws error
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
similarly i have multiple function i just want to pass each column from dataframe with the value associated within the column of dataframe into each user defined function like i have a function number similarly i have other function def new() def beg() one by one. Is there any way to solve that problem