I am struggling to find the correct method to read and parse a csv file in order to output the number of rows contained within the file
I am trying to figure out using different method but I am little stumped
import boto3, botocore, csv
s3 = boto3.resource('s3')
s3obj = s3.Object('mybucket','myfile')
with s3obj.get() as f:
reader=csv.reader(f,delimter=",")
data=list(reader)
row_count=len(date)
This obviously is not working becuase either 1, syntax is wrong or number 2 I have no idea what I am doing. I was referencing this article and tried to implement it using s3.
Instead of explicitly opening the file is possible to perform the csv.reader function on the s3 object using s3obj.get()?
Excuse my ignorance still learning programming and all so any explanation would be very helpful