Add missing lines in file if timestamp isn't continous : <p>I have .csv file containing continous data with timestamp (but in some cases some lines-minutes can be missing) and I need to write some script which will go through this file and add these missing lines with average values of neighboring lines.</p>

<p>Example of current data:</p>

<pre><code>_yyyy,_mm,_dd,_HH,_MM,_SS,T
2015,01,01,00,00,00,-5.0
2015,01,01,00,02,00,-5.2
2015,01,01,00,03,00,-5.3
2015,01,01,00,04,00,-5.3
2015,01,01,00,05,00,-5.3
2015,01,01,00,06,00,-5.3
2015,01,01,00,07,00,-5.3
2015,01,01,00,08,00,-5.3
2015,01,01,00,09,00,-5.3
2015,01,01,00,11,00,-5.3
2015,01,01,00,14,00,-5.3
</code></pre>

<p>and I would like to add these lines to their correct place:</p>

<pre><code>2015,01,01,00,01,00,-5.1
2015,01,01,00,10,00,-5.3
2015,01,01,00,12,00,-5.3
2015,01,01,00,13,00,-5.3
</code></pre>

<p>Thanks a lot for your answers</p>
