human
apply functions to each column.
assistant
Here is a Python function to apply s to each column

import pandas as pd

def apply_to_columns(df, func):
  """Apply a function to each column of a dataframe.
  """
  for column in df.columns:
    df[column] = func(df[column])
  return df

# Enter the data frame
df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})

# Calling the function
print((apply_to_columns(df, lambda x: x + 1)))

#Example Output

#    a  b
# 0  2  5
# 1  3  6
# 2  4  7

#Remember to inspect code for bugs.