Arrk interview question

Pandas implementation, lambda function