1

我在 Azure ML Studio 中使用 Execute Python Script 模块并编写了最基本的代码:

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
4

1 回答 1

1

这似乎是一个错误/功能,因此具有 int 列的数据框将无法成功返回到 ML Studio。您可以通过将列转换为浮点类型来修复它。

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

希望这对其他人有帮助

于 2018-10-04T00:56:34.720 回答