I am having issues with applying a custom function to a column of a data frame in Python. When I try to apply the function to the column of interest, I receive the following