I have the following dataset
Office | Employee ID | Joining Date | Attrition Date |
---|---|---|---|
AA | 700237 | 27-11-2017 | |
AA | 700238 | 11-01-2018 | |
AA | 700252 | 14-02-2018 | 08-04-2018 |
AB | 700287 | 18-01-2014 | |
AB | 700449 | 28-02-2014 | 17-04-2014 |
The idea is to add in Active Column if somebody joins and deduct if somebody resigns in any month and therefore want to change it in the following format using python
Office | Month & Year | Active |
---|---|---|
AA | Jan-17 | 0 |
AA | Feb-17 | 0 |
AA | Mar-17 | 0 |
AA | Apr-17 | 0 |
AA | May-17 | 0 |
AA | Jun-17 | 0 |
AA | Jul-17 | 0 |
AA | Aug-17 | 0 |
AA | Sep-17 | 0 |
AA | Oct-17 | 0 |
AA | Nov-17 | 1 |
AA | Dec-17 | 1 |
AA | Jan-18 | 2 |
AA | Feb-18 | 3 |
AA | Mar-18 | 3 |
AA | Apr-18 | 2 |
AB | Jan-14 | 1 |
AB | Feb-14 | 2 |
AB | Mar-14 | 2 |
AB | Apr-14 | 1 |
Please help.
31-02-2014
the last line in your dataframe - sammywemmy