执行Azure ML Studio中失败的Python脚本模块 [英] Execute Python Script Module Failing in Azure ML Studio

查看:63
本文介绍了执行Azure ML Studio中失败的Python脚本模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Azure ML Studio中使用执行Python脚本"模块,并且已经编写了最基本的代码:

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

推荐答案

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

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,

希望这对其他人有帮助

这篇关于执行Azure ML Studio中失败的Python脚本模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆