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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -