aws sagemaker read file from s3

PHOTO EMBED

Fri Jan 28 2022 03:38:30 GMT+0000 (Coordinated Universal Time)

Saved by @aurora1625 #s3 #sagemaker

import boto3
import pandas as pd
from sagemaker import get_execution_role

role = get_execution_role()
bucket='my-bucket'
data_key = 'train.csv'
data_location = 's3://{}/{}'.format(bucket, data_key)

pd.read_csv(data_location)
content_copyCOPY