Optimizing apply and lambda function with pandas

join shbcf.ru