标签:param rom aws bytesio class imp object data taf
import boto3
import io
import pandas as pd
# Set below parameters
bucket = ‘<bucket name>‘
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)
标签:param rom aws bytesio class imp object data taf
原文地址:http://blog.51cto.com/13959448/2315719