How to get a particular value from row in csv using python -


i have csv file following data :

raj, male rahul, male reena, female meena, female 

now need check condition :

if row[1] =="raj" , row[2] == "male" print "its boy" 

how can in python. pretty new python. no got particular value csv. can print rows completely. not 1 particular value. please help

rows = [] row in lines.split("\n"):    rows.append([])     rows[-1].append(row.split(", ")) 

where lines string data

then variable rows contain data , can query had before

the split method splits line newlines , commas


Comments