You are working with a large amount of data, which is creating huge lists (len = 385), much of the data is duplicated, within the lists, which is very confusing.
Also, I'm unsure why you are creating two objects:
I'll have a think about this and try to offer better help, but if you can find a way to help me better understand your objective, then please do.
edit to add:
I think that the major issue here is that you're trying to do too much at once: the task needs to be broken down into smaller steps (sub-tasks, if you will), solving one thing at a time, each step moving ever closer to the solution.
Also, I'm unsure why you are creating two objects:
header
and listreport
. You could do the exact same thing with one object (the iterator in the for
loop), which I've named row
.with open('Log.csv') as log: csv_reader = csv.reader(log) for row in csv_reader: if count<3: array.append(row) if row[5]=='Failed': failed.append(row) count+=1I'm still unclear about your objective, as your English is a little hard for me to follow; I can see that you are doing your best, so the fail here is more on my side than yours.
I'll have a think about this and try to offer better help, but if you can find a way to help me better understand your objective, then please do.
edit to add:
I think that the major issue here is that you're trying to do too much at once: the task needs to be broken down into smaller steps (sub-tasks, if you will), solving one thing at a time, each step moving ever closer to the solution.
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein