Customer lifetime function using pandas