Is there code for Append rows to df2 and, when appended, change value of that row?
I want to append (or really cut) row/s which meet a few different criteria from df_Clean to df_VOIDS and then update the 'Drop_Reason' col to a new value; ie indicating the criteria it was moved.
df_Clean=
Encoder Index Void Phase Max Force Max Force Avg THD Max
125545 NaN 0 54 19 6
125583 NaN 12 79 54 16
df_VOIDS=
Encoder_Index Void Phase_Max Force_Max Force_Avg THD_Max Drop_Reason
125544 Void 5 59 39 14 Voided
125657 Void 5 80 44 23 Voided
125901 Void 6 80 43 19 Voided
125963 Void 6 78 54 14 Voided
If Phase Max > 10, then ideally the last row of df_Clean would be removed and added to df_VOIDS with "above phase max" added to 'Drop_Reason'.
I'm doing several criteria checks ie Force Max, Force Avg etc in case that changes the answer.