DF2RO:只能处理DataFrame或DataFrame的长度为1的列表 [英] DF2RO: Can only handle DataFrame or list of length 1 of DataFrame

查看:113
本文介绍了DF2RO:只能处理DataFrame或DataFrame的长度为1的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

你好,

我正在Azure ML中使用Python脚本.

数据框为:

日期
 2016-05-01 2720.93
 2016-06-01 -1844.15
 2016-07-01 -473.40
 2016-08-01 3296.52
 2016-09-01 -1046.43
 2016-10-01 -305.18
 2016-11-01 3363.90
 2016-12-01 54349.28 

执行脚本时出现以下错误.

" DF2RO:只能处理DataFrame或DataFrame长度为1的列表.得到了{0},内容为{1}"..format(type(dataframe),dataframe)) 例外:DF2RO:只能处理DataFrame或DataFrame的长度为1的列表.得到了< class'pandas.core.series.Series'> ;,内容为DATE 2016-01-01 148.99 2016-05-01 2869.92 2016-06-01 1025.77 2016-07-01 552.37

解决方案

请检查以正确的格式导入您的数据.我将您的数据集复制到Excel文件中,将其转换为CSV,然后将其导入到Azure ML中,看来工作正常.

示例实验:

导入数据集的输出:

执行Python脚本"模块的输出:

此致,
Jaya


Hello,

I am using Python script in Azure ML.

Dataframe is:

DATE
 2016-05-01       2720.93
 2016-06-01      -1844.15
 2016-07-01       -473.40
 2016-08-01       3296.52
 2016-09-01      -1046.43
 2016-10-01       -305.18
 2016-11-01       3363.90
 2016-12-01      54349.28

When executing the script getting below error. Please help me on this.

"DF2RO: Can only handle DataFrame or list of length 1 of DataFrame. Got {0}, contents {1}".format(type(dataframe), dataframe)) Exception: DF2RO: Can only handle DataFrame or list of length 1 of DataFrame. Got <class 'pandas.core.series.Series'>, contents DATE 2016-01-01 148.99 2016-05-01 2869.92 2016-06-01 1025.77 2016-07-01 552.37

解决方案

Hi, 

Pls check to see that your data is getting imported in the right format. I copied your dataset into an Excel file, converted it into a CSV and then imported it into Azure ML and it seems to work fine. 

Sample experiment:

Output from imported dataset:

Output from 'Execute Python Script' module:

Regards,
Jaya


这篇关于DF2RO:只能处理DataFrame或DataFrame的长度为1的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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