Created
September 13, 2019 14:59
-
-
Save orimanabu/3d730b0e554abba1f91f984f15d361fe to your computer and use it in GitHub Desktop.
xxx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import json | |
import sys | |
input_path = sys.argv[1] | |
print("* " + input_path) | |
f = open(input_path, 'r') | |
data = json.load(f) | |
metrics = data['MetricDataResults'] | |
for m in metrics: | |
_id = m['Id'] | |
label = m['Label'] | |
timestamps = m['Timestamps'] | |
values = m['Values'] | |
for ts, val in zip(timestamps, values): | |
print(_id.encode() + ", " + label.encode() + ", " + ts.encode() + ", " + str(val)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment