title: Parse Python List
body: <p>I have a JSON data type raw.json</p>
  
  <pre><code>{"time": 12.640, "name": "machine1", "value": 24.0}
  {"time": 12.645, "name": "machine2", "value": 0.0}
  {"time": 12.65002, "name": "machine3", "value": true}
  {"time": 12.66505, "name": "machine4", "value": 1.345}
  {"time": 12.67007, "name": "machine5", "value": 5.068}
  {"time": 12.67508, "name": "machine4", "value": 1.075}
  {"time": 12.6801, "name": "machine5", "value": 2.0868}
  {"time": 12.6851, "name": "machine4", "value": 0.0}
  {"time": 12.6901, "name": "machine5", "value": 12.633}
  {"time": 12.69512, "name": "machine5", "value": 13.13}
  {"time": 12.70013, "name": "machine3", "value": false}
  {"time": 12.70515, "name": "machine3", "value": false}
  {"time": 12.71016, "name": "machine3", "value": false}
  {"time": 12.71517, "name": "machine5", "value": 131.633}
  </code></pre>
  
  <p>So in my python script i am able to generate a line by line read and generate a list</p>
  
  <pre><code>import json
  
  data = [];
  timestamp =[];
  with open('raw.json') as f:
      for line in f:
         data.append(json.loads(line))
      f.close()
  
  for idx, val in enumerate(data):
     time = data[idx]['time']
     name = data[idx]['name']
     value = data[idx]['value']
     data_list = idx+1, time, name, value
     print data_list
  </code></pre>
  
  <p>output: </p>
  
  <pre><code>(1, 12.64, u'machine1', 24.0)
  (2, 12.645, u'machine2', 0.0)
  (3, 12.65002, u'machine3', True)
  (4, 12.66505, u'machine4', 1.345)
  (5, 12.67007, u'machine5', 5.068)
  (6, 12.67508, u'machine4', 1.075)
  (7, 12.6801, u'machine5', 2.0868)
  (8, 12.6851, u'machine4', 0.0)
  (9, 12.6901, u'machine5', 12.633)
  (10, 12.69512, u'machine5', 13.13)
  (11, 12.70013, u'machine3', False)
  (12, 12.70515, u'machine3', False)
  (13, 12.71016, u'machine3', False)
  (14, 12.71517, u'machine5', 131.633)
  </code></pre>
  
  <p>I want to sort this data such that i can have individual lists (arrays) that i can use. e.g.</p>
  
  <pre><code>machine1 = [12.640, 24.0];
  machine2 = [12.645, 0.0];
  machine3 = [
  12.65002,true
  12.70013,false
  12.70515,false
  12.71016,false
  ]; 
  machine4 = [
  12.66505 1.345
  12.67508 1.075
  12.6851 0.0
  ];
  </code></pre>
  
  <p>and so on also in addition how can i search this tuple or the list directly to generate meta data like sum/average for machine1, machine 2 etc.</p>
  
  <pre><code>Sum_Machine1 = 24;
  Sum_Machine2 = 0;....
  </code></pre>