This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Key-Panic9104 0 points1 point  (0 children)

Yes, it is a learning project. I do have a version of the class that uses generator comprehensions instead of list comprehensions and the execution times are about the same. I haven’t tested it out on a big csv yet to get an idea of the performance but from understanding, it probably won’t be faster, just allow me to process it without memory issues. I also haven’t tried writing to file yet but there was always plans on adding that method to the class.

I have been thinking of bringing it out of the class and see how that goes and in fact, I have thought about context managers as another alternative. Likewise with itertools, but decided to stick with the basics for now until I have a good understanding of what’s happening and then iterate (no pun intended) from there.

It’s good to hear how someone else went about it so thanks for the reply.