I am trying to download a spreadsheet from this website https://www.theice.com/clear-singapore/risk-management#margin-rates. The file I want to download is called Margin Scanning (at the bottom of the website). Normally I would click on the link "Margin Scanning" to download but I want to use Python to automate it. Then I want the context to become my dataframe so that I can amend it and save it on my drive. Any idea how I can get it done? I know how to save a table from the web but I am not sure how to download a file from the link.
This is what I have tried:
import requests
url="https://www.theice.com/publicdocs/clear_singapore/irmParameters/ICSG_MARGIN_SCANNING_20200702.CSV"
response = requests.get(url)
margin_scanning = pd.DataFrame()
margin_scanning = response.content
Aucun commentaire:
Enregistrer un commentaire