My aim is to have a user, enter a value into a tkinter GUI. This value is then used to extract a row that contains the users input value. Example of test.CSV file;
The user input is 1000, thus
[(field1 cat),(field2 fred),(field3 apple),(field4 1000),(field5 car)] will be extracted
I have achieved the CSV lookup by using the following code
import csv
with open('test.csv') as f:
reader =csv.DictReader(f)
rows = [row for row in reader if row['field4'] =='1000']
for row in rows:
print (row)
The next step is to print only the columns that i require i.e. not all the columns are required :
I only want [(field1 cat), (field3 apple)], can this be achieved using the above code, or is there a better way of a Vlookup() in Python ?

print(*(row[field] for field in ('field1', 'field3')]))?