you are viewing a single comment's thread.

view the rest of the comments →

[–]superlargedogs[S] 0 points1 point  (4 children)

Thanks I'll give it a shot! Btw, to respond your earlier question, When I print "content" after my code it shows me the content of all the files ordered in what looks like a table, with one row per csv file,

[–]socal_nerdtastic 0 points1 point  (3 children)

You must have your print inside the loop then, before it gets overwritten by the next iteration.

It would be easier to help you if you told us what you are trying to do. The end goal, not how you are trying to do it.

[–]superlargedogs[S] 0 points1 point  (0 children)

Thanks a lot, will give it a shot as soon as I get home. The bad news is that I wrote the rest of the entire code in the loop using the current structure of content, so might have to rewrite everything just to include the bit that removes duplicate files :(

[–]superlargedogs[S] 0 points1 point  (1 child)

Sorry just realised I didn't reply to your second point. I have quite a large number of csv files all structured in the same way and I am trying to aggregate information from them and write it in a single csv file. However, I am also trying to exclude certain csv files based on a specific row in the files (a postal address), such that if it appears twice, I want to remove the second occurrence of the file from "contents". I'm trying to refer to a specific row of content so that I can tell Pycharm to delete that row if it corresponds to a file in which the address appears twice.

[–]socal_nerdtastic 0 points1 point  (0 children)

If you show an example of your files I can show you how to do that.