Hi, I have a python assignment due in about 3 hours, and naturally, like every uni student, I’ve left it to the last minute. The problem is, I need to take tables provided as test data, and retrieve the values, and then make graphs. I’m having problems retrieving the values.
I wanted to do a nested for loop, something like this
Then you can do whatever to each element. But obviously I am just guessing and all the checks for file usage and other precautions is not there (just illustration), could you provide more detail?
won't that only read the lines? There's a number of values on each line. I know how to get the lines, but it's separating them into the separate values that's the problem.
Ok I have not used csv before, but i can see that it was harder because of the return characters instead of new line ones for me. Some of the formatting has issues in the file. But i think you'll get the idea with this:
//line 6 is mixed up with column header for i in range(7 ,len(new_list)): test = new_list[i].split(",") for j in range(len(test)): print test[j] print "\n"