我试图在Azure ML Studio中使用相同的数据格式将一个数据帧附加到另一个数据帧。 该脚本非常简单,但输出的数据类型不被理解"错误,我无法弄清楚原因。
import pandas as pd
import numpy as np
def azureml_main(dataframe1, dataframe2):
print('Input pandas.DataFrame #1:\r\n\r\n{0}'.format(dataframe1))
new_dataframe1 = dataframe1.append(dataframe2)
return new_dataframe1,
输入数据格式如下:
Input example:
2017-10-24T08:59:59.3+00:00 abcde auto 41 0917D884 F48 36
2017-10-24T09:00:10.57+00:00 abcde auto 52 0917H349 F20 65
2017-10-24T09:00:15.49+00:00 abcde auto 7 0917D833 F48x 30
2017-10-24T09:00:15.91+00:00 abcde auto 55 0917H366 F20 34
2017-10-24T09:00:16.49+00:00 abcde auto 60 0917D954 F48 1
错误讯息:
Error 0085: The following error occurred during script evaluation, please view the output log for more information:
---------- Start of error message from Python interpreter ----------
Caught exception while executing function: Traceback (most recent call last):
File "C:\server\invokepy.py", line 199, in batch
odfs = mod.azureml_main(*idfs)
File "C:\temp\ab81dec1cf8542af837324f3421cb72d.py", line 31, in azureml_main
new_dataframe1 = dataframe1.append(dataframe2)
File "C:\pyhome\lib\site-packages\pandas\core\frame.py", line 4322, in append
verify_integrity=verify_integrity)
File "C:\pyhome\lib\site-packages\pandas\tools\merge.py", line 835, in concat
return op.get_result()
File "C:\pyhome\lib\site-packages\pandas\tools\merge.py", line 1025, in get_result
concat_axis=self.axis, copy=self.copy)
File "C:\pyhome\lib\site-packages\pandas\core\internals.py", line 4474, in concatenate_block_managers
for placement, join_units in concat_plan]
File "C:\pyhome\lib\site-packages\pandas\core\internals.py", line 4474, in <listcomp>
for placement, join_units in concat_plan]
File "C:\pyhome\lib\site-packages\pandas\core\internals.py", line 4571, in concatenate_join_units
for ju in join_units]
File "C:\pyhome\lib\site-packages\pandas\core\internals.py", line 4571, in <listcomp>
for ju in join_units]
File "C:\pyhome\lib\site-packages\pandas\core\internals.py", line 4825, in get_reindexed_values
missing_arr = np.empty(self.shape, dtype=empty_dtype)
TypeError: data type not understood
Process returned with non-zero exit code 1
---------- End of error message from Python interpreter ----------
Start time: UTC 10/26/2017 07:22:43
End time: UTC 10/26/2017 07:23:05
感谢您的帮助!
答案 0 :(得分:0)
我查了一下,不知何故标题栏被混淆了。 纠正这个问题!
谢谢!