Python: Apply .apply() with a self-defined function to a Data Frame- why doesn't it work

welcome to shbcf.ru