title: how to display a csv file in line protocol format?
body: <p>How do I display a CSV file in line protocol format, like <code>influxdb</code> uses?</p>
  
  <pre><code>measurement[,tag_key1=tag_value1...]
  field_key=field_value[,field_key2=field_value2] [timestamp]
  </code></pre>
  
  <p>suppose my csv file is as follows:</p>
  
  <pre><code>Date          Time            place       status      action
  2 sep 2016   12:05:50:274     abc          on         batery on
  16 sep 2016  12:05:51:275     mbc          on         batery on
  22 sep 2016  12:05:52:276     kabc          on        batery on
  </code></pre>
  
  <p>I am able to read the entire csv file line by line by using the code:</p>
  
  <pre><code>**with open('test.csv') as fp:
        for line in fp:
           print line**
  </code></pre>
  
  <p>and i'm getting the o/p as :</p>
  
  <pre><code>['Date','Time','place','status','action']
  ['2 sep 2016','12:05:50:274','abc','on','batery on']['16 sep 2016','12:05:51:275','mbc',     'on','batery on']['22 sep 2016','12:05:52:276','kabc','on','batery on']
  </code></pre>
  
  <p>Whereas I want the out put to in lineprotocol format/syntax such as:</p>
  
  <pre><code>Date=2 sep 2016,place=abc,'status=on,action=battery on,Time=12:05:50:274
  </code></pre>
  
  <p>And also I want the code to be able to convert , <code>Time=12:05:50:274</code> into epoch time so that it can be used as timestamp in line protocol for <code>influx db</code>.</p>