how to read one complete row in the CSV
Hello,
I'm trying to read a complete row which is containing two three points in my CSV document. but it is reading first line of the row and come back to the script. Please help me to come out from the issue.
My script is:
import csv
# Enter file name details
file = input("Enter File name")
if (file == ""):
popup("No file name given")
exit(0)
# Enter Row number details
Row = int(input("Enter a row number"))
if(Row == ""):
popup("no row number given")
exit(0)
# main Function call
def lineFromCSV(file, Row):
data = csv.reader(
for i in range(Row+1) :
Row = data.next()
return Row
def extractColInfo(
for i in range(7):
tt[i] = temp[i]
popup (str(tt[i]))
temp = lineFromCSV(file, Row)
#extractColInfo
popup( ', '.join(temp))
popup ("Done")
My csv is:
Sl No DO-229D STP ID Scenario Simulator Dump
1 2.1.1.2 (b)
2.1.1.3.1 (b) STP-GPSBL-007 gpsb028 Spirent Iono_correction
2 2.1.1.2 (c )
2.1.1.3.1 (c ) STP-GPSBL-008 gpsb028 Spirent Iono_correction
3 2.1.1.2 (d)
2.1.1.3.1 (d)
2.1.1.2 (g) STP-GPSBL-009 gpsb028 Spirent Tropospheric_
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: