Hi all I need help pulling integers from a file in python. I have a file that is in csv format and has 200000 numbers in it. And I need to pull all of the numbers out and insert them into a list and then get the mean of the numbers that are in the list. I have tried but the problem is it won't let me convert the list into integers. Attached is some code that I have so far.
if(nameOfFile == 'Alpha'):
fileopen = open('Alpha.txt', 'rU')
csvReader = csv.reader(fileopen,'excel')
insert = list()
for row in csvReader:
loopFlag = True
print "Homework #7 Menu"
print "1. Load File"
print "2. Print the Mean of all the numbers"
print "3. Print the Standard Deviation of all the numbers"
print "4. Generate a table based on Mean and Standard Deviation"
print "q. Quit"
choice=raw_input(" Please enter your selection")
if (choice == '1'):
nameOfFile = raw_input("Please enter name of file you want to open")
l = loadFile(nameOfFile)
elif (choice == '2'):
elif (choice == '3'):
elif (choice == '4'):
elif (choice =='q') or (choice =='Q'):
print "Invalid Menu Item"