☰
Debian Codegraph
@
8.6.6-1
8.6.5-2
/
/
cylc
/
flow
/
etc
/
examples
/
external-data-files
/
lib
/
python
/
load_data.py
☽
☼
cylc/flow/etc/examples/external-data-files/lib/python/load_data.py
code
plain
raw
GPL-3+
(C) 2008-2016 Hilary Oliver, NIWA
debian/copyright
1
import csv
2
import json
3
4
5
def load_csv(filename):
6
with open(filename, 'r') as csv_file:
7
return list(csv.DictReader(csv_file))
8
9
10
def load_json(filename):
11
with open(filename, 'r') as json_file:
12
return json.load(json_file)