zzl001 发表于 2019-2-22 11:06:57

python取aws s3文件

import boto3
import io
import pandas as pd
# Set below parameters
bucket = ''
key = 'data/training/iris.csv'
endpointName = 'decision-trees'
# Pull our data from S3
s3 = boto3.client('s3')
f = s3.get_object(Bucket=bucket, Key=key)
# Make a dataframe
shape = pd.read_csv(io.BytesIO(f['Body'].read()), header=None)


页: [1]
查看完整版本: python取aws s3文件