#!/usr/bin/env python
import json
import pandas

nested = json.load(open('schedule.json'))

def unnest(nested):
    for k,v in nested['schedule'].items():
        for session in v.values():
            session['track'] = k
            yield session

flat = list(unnest(nested))

json.dump(flat, open('flat.json', 'w'))
pandas.DataFrame(flat).to_csv('flat.csv', encoding = 'utf-8')

78a84b7fb34ecd8005bc48c8eb5d94b9a9beeb9b
<mask token>

<mask token>


def unnest(nested):
    for k, v in nested['schedule'].items():
        for session in v.values():
            session['track'] = k
            yield session


<mask token>
json.dump(flat, open('flat.json', 'w'))
pandas.DataFrame(flat).to_csv('flat.csv', encoding='utf-8')

<mask token>
nested = json.load(open('schedule.json'))


def unnest(nested):
    for k, v in nested['schedule'].items():
        for session in v.values():
            session['track'] = k
            yield session


flat = list(unnest(nested))
json.dump(flat, open('flat.json', 'w'))
pandas.DataFrame(flat).to_csv('flat.csv', encoding='utf-8')

import json
import pandas
nested = json.load(open('schedule.json'))


def unnest(nested):
    for k, v in nested['schedule'].items():
        for session in v.values():
            session['track'] = k
            yield session


flat = list(unnest(nested))
json.dump(flat, open('flat.json', 'w'))
pandas.DataFrame(flat).to_csv('flat.csv', encoding='utf-8')

#!/usr/bin/env python
import json
import pandas

nested = json.load(open('schedule.json'))

def unnest(nested):
    for k,v in nested['schedule'].items():
        for session in v.values():
            session['track'] = k
            yield session

flat = list(unnest(nested))

json.dump(flat, open('flat.json', 'w'))
pandas.DataFrame(flat).to_csv('flat.csv', encoding = 'utf-8')
