【问题标题】:Execute Python Script Module Failing in Azure ML Studio在 Azure ML Studio 中执行 Python 脚本模块失败
【发布时间】:2019-03-09 07:15:29
【问题描述】:

我在 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

【问题讨论】:

    标签: python-3.x azure ml-studio


    【解决方案1】:

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

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

    希望这对其他人有所帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-03
      • 1970-01-01
      • 2022-10-13
      • 1970-01-01
      相关资源
      最近更新 更多