I have a big dataset and for one of the columns that is dependent upon another column, I have to take the average as I go. For example. Row 1 average then when I go to row 2 I want the average of rows 1 and 2 and so on. Moreover, I have non-integers in my column and I only want to take the average of integers and I want it to skip those non-integers without affecting my average. (Include those rows but not include it in the average). I was thinking of writing a for loop but I got confused and don't know how to implement it. Any help would be greatly appreciated.
The picture shows part of the dataFrame. As you can see, the first column is based on Complete, NotComplete (and it's a daily compliance). I'm importing an Excel file and I try to modify it so it turns the complete/NotComplete into 100% and 0% respectively and add a new column to take the average. However, I want the average to be consistent and include every day and stops at the day that no Complete/NotComplete data is entered (That's the current day and the next day there will be data in there as people will complete/NotComplete the project). I need to keep track of completion of a task on a daily basis and finally, Add a last column indicating that if they go below 85% that they are "No Longer Compliant" but as long as they are above 85%, they are "Still Compliant". Hope this is clear enough.