Home > Software engineering >  Unable to read csv from S3 presigned url directly in jupyter notebook
Unable to read csv from S3 presigned url directly in jupyter notebook

Time:03-22

Hi is there anyway to open csv file from s3 presigned url in a script rather than downloading it from browser! I recieve a presigned s3 url every hour on gmail. I have to download it manually everytime. I decided to automate the process by scraping my emails, have reached the step where I am able to get the fresh presigned link but unable to open the csv file, rather it returns a script. Please help.

CodePudding user response:

You can use requests to perform a GET request.

From the enter image description here

So you can simply:

import pandas as pd
df = pd.read_csv('https://...')
  • Related