I would like to convert the pandas/python code below to a Mysql UDF/procedure function. Can you please provide suggestions or point me to any code? The code conversion is fo