【发布时间】:2018-04-28 01:36:20
【问题描述】:
import boto3
import io
import pandas as pd
# The entry point function can contain up to two input arguments:
# Param<dataframe1>: a pandas.DataFrame
# Param<dataframe2>: a pandas.DataFrame
def azureml_main(dataframe1 = None, dataframe2 = None):
s3 = boto3.client('s3',
aws_access_key_id='REMOVED',
aws_secret_access_key='REMOVED')
obj = s3.get_object(Bucket='bucket', Key='data.csv000')
df = pd.read_csv(io.BytesIO(obj['Body'].read()))
return df,
我正在尝试使用 Execute Python 模块从 S3 读取数据。我已经下载了 boto3 包并将其转换为 zip。然后,我将该 .zip 上传并连接到模块的第三个输入选项。当我运行此代码时,我收到一条错误消息,指出未安装 botocore。有没有人能够直接从 S3 读取到 Azure ML 工作室?我试过使用 R 脚本模块,但也失败了,所以现在我正在尝试 python。
【问题讨论】:
标签: python pandas azure dataframe azure-machine-learning-studio