1,2,3,4,5
6,7,8,9,10
...
I am reading the file into a Python script like:
Code: Select all
f = open("filename.csv", "r")
data = f.read()
f.close()
data = data.replace('\r','').split("\n")
# Now I'm trying to convert the strings to ints, but I cannot figure out the issue is:
for line in data:
lineList = line.split(',')
print(lineList)
for i in lineList:
print(repr(i))
print(repr(int(i))) # This fails