I have a folder with a few hundred thousands data files in it. And what I want to do is separate the data into groups of n (which will be inputted by the user) in a way that allows me to manipulate just that group of data. Then I want to start back where I left off in the folder and take another group. For example if n was 5 I would want files 1-5 to be read and manipulated then I'd like to have 6-10 read and so on and so forth.
I have tried using a for loop and the yield keyword but I was having a problem with a generator error. I would like to continue using the for loop with just a different technique of grabbing the data.
I have tried using a for loop and the yield keyword but I was having a problem with a generator error. I would like to continue using the for loop with just a different technique of grabbing the data.