问题
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