def cache(): return Cache()
summary_structures[['id', 'parent_structure_id', 'acronym']].to_csv('summary_structures.csv', index_label='structure_id') reread = pd.read_csv('summary_structures.csv') #=============================================================================== # example 10 #=============================================================================== for id, name, parent_structure_id in summary_structures[[ 'name', 'parent_structure_id' ]].itertuples(): print("%d %s %d" % (id, name, parent_structure_id)) #=============================================================================== # example 11 #=============================================================================== from allensdk.api.warehouse_cache.cache import Cache cache_writer = Cache() do_cache = True structures_from_api = \ cache_writer.wrap(rma.model_query, path='summary.csv', cache=do_cache, model='Structure', criteria='[graph_id$eq1]', num_rows='all')