Created
April 22, 2020 17:03
-
-
Save sergiolucero/453dffbd9f84c4a229e73ab4734e4eeb to your computer and use it in GitHub Desktop.
bonobo productos COVID-19
This file contains 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
import bonobo | |
from sqlib import get_CAM_data, summarize, to_excel | |
def Extracción(): | |
data = get_CAM_data() | |
print([(key,len(kdata)) for key, kdata in data.items()]) | |
yield data | |
def Transformación(): | |
data['summary'] = summarize(data) # compute 2019/2020 stats | |
yield data | |
def Publicación(): | |
to_excel(data, 'data_cam_full_Apr22.xlsx') | |
graph = bonobo.Graph(Extracción, Transformación, Publicación) | |
bonobo.run(graph) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment