Skip to content

Instantly share code, notes, and snippets.

@malemi
Created April 27, 2020 09:24
Show Gist options
  • Save malemi/d3e56822a5e13aaf082eb98f9aeb98e1 to your computer and use it in GitHub Desktop.
Save malemi/d3e56822a5e13aaf082eb98f9aeb98e1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import pandas as pd
import numpy as np
file_key = "1sIkC1vBalHB8SJsgpPazFGUSrMNUani6jLrOFS6IEFo"
df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/{file_key}/export?format=csv")
for [item,number] in df.to_numpy():
with open(item, 'w') as f:
f.write(f'{{"number":"{number}"}}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment