pandas read s3 object in jupyter notebook
import boto3 s3_resource = boto3.resource('s3') bucket = s3_resource.Bucket(name='{bucket_name}') for file in bucket.objects.all(): # do what you want with the files # for example: if 'filter' in file.key: print(file.key) new_df = pd.read_csv('s3:://{bucket_name}/{}'.format(file.key))
Source: stackoverflow.com
pandas read s3 object in jupyter notebook
import s3fs # csv file df = pd.read_csv('s3://{bucket_name}/{path_to_file}') # parquet file df = pd.read_parquet('s3://{bucket_name}/{path_to_file}')
Source: stackoverflow.com