Here is my Python code:
import csv
# Reading
ordersFile = open('orders.csv', 'rb')
ordersR = csv.reader(ordersFile, delimiter=',')
# Find order employeeID=5, shipCountry="Brazil"
print "Find order employeeID=5, shipCountry=\"Brazil\""
for order in ordersR:
if order[2] == '5' and order[13] == 'Brazil':
print order
# Find order employeeID=5
print "Find order employeeID=5"
for order in ordersR:
if order[2] == '5':
print order
ordersFile.close()
I can print something of "# Find order employeeID=5, shipCountry="Brazil"", but I got nothing for # Find order employeeID=5. I was thinking of how to reading(selecting) rows in the same csv files more than one time.
ordersFile.seek(0)?