Created
February 8, 2023 14:35
-
-
Save mebaysan/b757bfa1e553a235b757b70b3e7bd6ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !pip install pandas | |
import pandas as pd | |
def read_gsheet(google_sheet_id, work_sheet_name): | |
# google_sheet_id => You can find the sheet id in the url of your file behind “d/”, copy it from your browser and paste it into your code. The sheet name is the name you gave your sheet. | |
url = f"https://docs.google.com/spreadsheets/d/{google_sheet_id}/gviz/tq?tqx=out:csv&sheet={work_sheet_name}" | |
return pd.read_csv(url) | |
read_gsheet("","") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating pandas dataframe from google sheets.