Fetching of data from csv file

Asked by Anurag

Hope you guys doing well!!!!

say my csv is like this :
name, anurag , rajeev, bhaskar, rhonda
age, 23,24,25,28
marks, 23, 45,67,76

out = open("c:\\temp1\\et.csv","rb")
data = csv.reader(out)

        data=[row[1] for row in data]
print(data[0])
print(data[1])
print(data[2])

Now i have to call row value like anurag from name , 23 age and 23 from marks individually like 'anurag' at specific location in script and i am able to do so easliy by calling data[0], data[1], data[2]
but now i have to call rajeev, 24, 45 and use in script at same location where i used the value of first ones.

means i have to repeat steps of my script after the successful completion using values of row 1(anurag,23,23 at their respective location like anurag at their location and 23 at their and 23 at their) and then it use value of row 2 and then row 3

hope you got my question !!!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

things are not getting better, when repeating the same question.

The ball is on your side since:
https://answers.launchpad.net/sikuli/+question/254275 --- comment #3

Revision history for this message
Anurag (annubhav-10) said :
#2

Thanks RaiMan, that solved my question.