This is your daily margin file, I want to download it programatically when I download the daily instrument dump. No clue how to proceed with downloading from google sheets programatically. Please help
Hi @devshoe To read the spreadsheet from the given URL, you can follow the given steps. 1. Every Google spreadsheet contains a sheet ID. ex - this sheet has ID = 1fLTsNpFJPK349RTjs0GRSXJZD-5soCUkZt9eSMTJ2m4 2. copy and split the URL till that sheet ID and then add /export?format=csv in the end. 3. Then use the below code for getting sheet data into a dataframe.
To read the spreadsheet from the given URL, you can follow the given steps.
1. Every Google spreadsheet contains a sheet ID.
ex - this sheet has ID = 1fLTsNpFJPK349RTjs0GRSXJZD-5soCUkZt9eSMTJ2m4
2. copy and split the URL till that sheet ID and then add /export?format=csv in the end.
3. Then use the below code for getting sheet data into a dataframe.
import pandas as pd
df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/1fLTsNpFJPK349RTjs0GRSXJZD-5soCUkZt9eSMTJ2m4/export?format=csv")
print(df)
Instead of CSV, you may use excel to download individual sheets.
ex -