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