Execute Python Script Module Failing in Azure ML Studio

久未见 提交于 2020-03-23 08:58:21

问题


I'm using Execute Python Script module in Azure ML Studio and have written the most basic of code:

import pandas as pd
def azureml_main(dataframe1 = None, dataframe2 = None):
    dataframe1["Result"] = dataframe1["3MPurchNo"] * 3
    return dataframe1,

It fails with the following error:

File "C:\server\XDRReader\xdrwriter3.py", 
line 190, in write_object
raise NotImplementedError
('Python Bridge conversion table 
not implemented for type [{0}]'.format(value.getType()))
NotImplementedError: 
Python Bridge conversion table not implemented for 
type [<class 'numpy.int32'>]
Process returned with non-zero exit code 1

回答1:


This seems to be a bug/feature whereby a dataframe with an int column will not be successfully returned to ML Studio. You can fix it by casting columns to float type.

import pandas as pd
def azureml_main(dataframe1 = None, dataframe2 = None):
    dataframe1["Result"] = (dataframe1["3MPurchNo"] * 3).astype(float)
    return dataframe1,

Hope this helps others



来源:https://stackoverflow.com/questions/52637514/execute-python-script-module-failing-in-azure-ml-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!