我在Azure ML Studio中使用“执行Python脚本”模块,并且已经编写了最基本的代码:
import pandas as pd
def azureml_main(dataframe1 = None, dataframe2 = None):
dataframe1["Result"] = dataframe1["3MPurchNo"] * 3
return dataframe1,
它失败并出现以下错误:
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
答案 0 :(得分:0)
这似乎是一个错误/功能,带有int列的数据框将无法成功返回到ML Studio。 您可以通过将列转换为浮点型来解决它。
import pandas as pd
def azureml_main(dataframe1 = None, dataframe2 = None):
dataframe1["Result"] = (dataframe1["3MPurchNo"] * 3).astype(float)
return dataframe1,
希望这对其他人有帮助