csv.py 620 Bytes
Newer Older
1
2
3
4
def configure(context):
    context.stage("data.microcensus.persons")
    context.stage("data.microcensus.trips")
    context.stage("data.microcensus.transit")
Sebastian Hörl's avatar
Sebastian Hörl committed
5
6
7
8

def execute(context):
    df_persons = context.stage("data.microcensus.persons")
    df_trips = context.stage("data.microcensus.trips")
Sebastian Hörl's avatar
Sebastian Hörl committed
9
    df_transit = context.stage("data.microcensus.transit")
Sebastian Hörl's avatar
Sebastian Hörl committed
10

11
12
13
    df_persons.to_csv("%s/mz_persons.csv" % context.cache_path, sep = ";", index = None)
    df_trips.to_csv("%s/mz_trips.csv" % context.cache_path, sep = ";", index = None)
    df_transit.to_csv("%s/mz_transit.csv" % context.cache_path, sep = ";", index = None)