python - How to read a two digit numbers in CSV file and storying it in a list? -


i scanning column in python, full of integers. there double digit numbers.

d = []  column in readdatasourcefile: #readdatasourcefile works well. file open , delimiter     if column[1] == 'something' , column[0] == 'somewhere':         countfl += 1         print column[5]         = map(int, column[5])         d.extend(some)  print d 

here column[5] 1, 15, 23, 1, 4, 5. print displays [1, 1, 5, 2, 3, 1, 4, 5]

probably some = map(int, column[5]) split number on digits

print map(int, '15')  [1, 5] 

so print some check it.

maybe need some = int(column[5])


edit: try

    print column[5]     = int(column[5])     d.append(some) 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -