I have a dataframe like this,
DataFrame_A
Employee ID A_ Status C_Code TestCol Result_A Result_B
20000 Yes USA asdasdq True False
20001 No BRA asdasdw True True
200002 USA asdasda True True
200003 asda MEX asdasar False False
In this dataframe, Result_A and Result_B are Boolean columns.
I want to build a summary dataframe through a function, so that I can re-use.
I need the following columns in my dataframe and the output for Result_A looks as below and the Result_B another Boolean column will be the next row of the summary dataframe.
Name of the Column No. of Records No. of Employees True_Records False_Records A_Status_Yes A_Status_No Mex_True Mex_False USA_True USA_False
Result_A 4 4 3 1 1 1 0 1 2 2
Also to note, Employee ID may sometimes be EMPLOYEE ID or Employee_ID or EMPLOYEE_ID or EMPL_ID. So, a list need to be inside python and only one of them will be present inside the function
In real time, I have 25 data frames, therefore looking for a function that I can reuse and append.
Kindly help me with this.