How to print csv rows in ascending order Python
<p>I am trying to read a csv file, and parse the data and return on row (start_date) only if the date is before September 6, 2010. Then print the corresponding values from row (words) in ascending order. I can accomplish the first half using the following: </p>

<pre><code>import csv

with open('sample_data.csv', 'rb') as f:

read = csv.reader(f, delimiter =',')

for row in read:

    if row[13] &lt;= '1283774400':
        print(row[13]+"\t \t"+row[16])
</code></pre>

<p>It returns the correct start_date range, and corresponding word column values, but they are not returning in ascending order which would display a message if done correctly.</p>

<p>I have tried to use the sort() and sorted() functions, after creating an empty list to populate then appending it to the rows, but I am just not sure where or how to incorporate that into the existing code, and have been terribly unsuccessful. Any help would be greatly appreciated.  </p>