python - AWS Jupyter Notebook EC3 Instance: Getting error while reading pandas csv from S3 -
while reading csv s3 kernel restarting below pop :
kernel restarting kernel appears have died. restart automatically
below code snippet:
import boto3 import pandas pd boto.s3.connection import s3connection your_access_key='******' your_secret_key='******' your_bucket='******' client = boto3.client('s3',aws_access_key_id=your_access_key, aws_secret_access_key=your_secret_key) client.download_file(your_bucket, 'test.csv','test.csv')
error thrown below line :
test_df = pd.read_csv('test.csv')
but can access other files such sample text file:
client.download_file(your_bucket, 'sample.txt','sample.txt') print(open('sample.txt').read())
before assumed error because of huge size of csv file reading 5mb csv file resulting same error.
would appreciate !
Comments
Post a Comment