Human: Write me a Python function to apply to a data frame. Assistant: 
Here is a Python function to apply to data frame

import pandas as pd

def apply_function_to_dataframe(dataframe, function):
        """Applies function to dataframe."""
        return dataframe.apply(function)

# Enter the dataframe
dataframe = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})

# Calling the function
print((apply_function_to_dataframe(dataframe, lambda x: x + 1)))

#Example Output

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

#Remember to inspect code for bugs.