how to apply a function to every item of a column in python code example Example: pandas apply function to column df['a'] = df['a'].apply(lambda x: x + 1)