Here is my code:
import csv
import requests
with requests.Session() as s:
s.post(url, data=payload)
download = s.get(\'url that directly download a
You can update the accepted answer with the iter_lines method of requests if the file is very large
import csv
import requests
CSV_URL = 'http://samplecsvs.s3.amazonaws.com/Sacramentorealestatetransactions.csv'
with requests.Session() as s:
download = s.get(CSV_URL)
line_iterator = (x.decode('utf-8') for x in download.iter_lines(decode_unicode=True))
cr = csv.reader(line_iterator, delimiter=',')
my_list = list(cr)
for row in my_list:
print(row)