Get Values from last Row of .csv File
<p>I am logging in <code>DataLogging.csv</code>Temperature and Humidity:</p>

<pre><code>2016-04-07 09:36    16.0    48.7
2016-04-07 09:37    16.0    48.7
2016-04-07 09:38    16.0    48.7
2016-04-07 09:39    16.1    48.8
2016-04-07 09:40    16.1    48.7
</code></pre>

<p><code>row[0]</code> gets me the Date, <code>row[1]</code> the Temp and <code>row[2]</code> Humidity</p>

<p>What is the fastest way to get the Temperature and Humidity Values from  the last row of the file(so those that have been logged last)? In this case the <code>09:40</code> values</p>

<p>@Edit: The Logger runs on a Raspberry Pi 2</p>

<p>I found this method: (<a href="https://stackoverflow.com/questions/20296955/reading-last-row-from-csv-file-python-error">Stackoverflow Link</a>)</p>

<pre><code>from collections import deque
import csv

def get_last_row(csv_filename):
    with open(csv_filename, 'rb') as f:
        return deque(csv.reader(f), 1)[0]

lastline = ', '.join(get_last_row('DataLogger.csv'))
values = lastline.split("\t")
print ((values[1]))
</code></pre>

<p>now I get the Temperature Value from the Last line ....</p>