Prepare dataframe to run functions