Debian Codegraph @

cylc/flow/etc/examples/external-data-files/lib/python/load_data.py

raw
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)