Google Sheets Reader
import pandas as pd
import re
# This function will convert the url to a download link
def convert_gsheets_url(u):
try:
worksheet_id = u.split('#gid=')[1]
except:
# Couldn't get worksheet id. Ignore it
worksheet_id = None
u = re.findall('https://docs.google.com/spreadsheets/d/.*?/',u)[0]
u += 'export'
u += '?format=csv'
if worksheet_id:
u += '&gid={}'.format(worksheet_id)
return u
Run to view results
Run to view results