Merging files from different folders

Viewed 21

Lets say I have the following folders: test1, test2, test3, test4, test 5. And in each of those folders is a tsv file. What I would like to do is write a for loop that lets me, without specifying the name of the folder, read the tsv file and copy a specific column to a new object. and when that is done, move the folder to another location so that it is marked done. and move on to the next folder.. and so on.

I am able to write the code to merge the dataframe but am having very much trouble with for loops.

If anyone could help that would be major.

0 Answers
Related