While Loop in Python - Array Manipulation
Just before for a_class,a_class_weight in zip(classes, class_weights):, you're initializing total_fold_array to [].
That loop executes for exactly as many times as there are elements in classes.
Each iteration of that loop appends a curr_fold_array to total_fold_array.
That is why, at the end of that loop, you have as many elements in total_fold_array, as there are in classes.
You've enclosed all of this in while count != 6:. That seems totally unnecessary -- I think that while loop will execute exactly once. You are returning from that function before the second iteration of that while loop can happen. My guess is that you introduced that while loop hoping that it would somehow limit the number of elements in total_fold_array to 5. But that's not going to happen, because, inside that while loop, the for loop grows total_fold_array to have 7 elements, and this happens in the very first iteration of the while loop.
I am working on the following Python codes.
I am hoping to accomplish the following:

Create a total_fold_array which will hold 5 items (folds)
For each fold, create an array of data from a larger dataset based off of the logic (which I know is correct) inside of my for...zip loop

To help you understand:
The classses and class_weights returns:
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0] and [0.14285714 0.14285714 0.14285714 0.14285714 0.14285714 0.14285714
 0.14285714]
The while count !=6 is not working properly. In short, what I am trying to accomplish is to populate the total_fold_array with 5 individual folds, which each contain a number of rows from a dataset.
An example of the current_fold_array might be [A,B,C,D], so then ultimately, I have a total_fold_array which has 5 of those individual folds, which would look like [[A,B,C,D,],[A,B,B,C],[A,A,A,A],[B,C,D,D],[B,B,B,C]]
However, this loop does not do that. Instead, it creates total_fold_array with the length of whatever the length of classes is (in this case 7), instead of having 5 folds within.
My code is below:
I am currently getting a total_fold_array containing 7 items, when instead, it should contain 5. Each item within can have as many items as needed, but the total_fold_array should be 5 items long. I believe there is a logic bug in my code, and I am looking for some help. If I were to use a dataset with 5 classes, this works appropriately. 
Please let me know if I need to make this clearer.