I have the following DF.
DF qty
| hold_date | day_count | qty | item | ccy |
+------------+-----------+------+----------+-----+
| 2015-01-01 | 1 | 1200 | CB04 box | USD |
| 2015-01-01 | 3 | 1500 | AB01 box | USD |
| 2015-01-02 | 2 | 550 | CB03 box | USD |
I want to increment the hold_date based on the day_count. for example item : AB01 box will add two new rows as below. so the df could look like this.
DF qty
| hold_date | qty | item | ccy |
+------------+------+----------+-----+
| 2015-01-01 | 1200 | CB04 box | USD |
| 2015-01-01 | 1500 | AB01 box | USD |
| 2015-01-02 | 1500 | AB01 box | USD |
| 2015-01-03 | 1500 | AB01 box | USD |
| 2015-01-02 | 550 | CB03 box | USD |
| 2015-01-03 | 550 | CB03 box | USD |