[pandas] How to properly apply a lambda function into a pandas data frame column