I have a dataframe similar to this one containing an enumerated date, and ID, and number of items sold for given date and ID:

```
Date  ID  num_sold
0     1   0
      2   13
1     1   6
      2   0
2     1   0
      2   0
3     1   5
      2   4

```

For each ID, I want to compute the Date when last sale happened. So I have the following dataframe: 

```
Date  ID  num_sold  last_sale
0     1   0         -1
      2   13        -1
1     1   6         -1
      2   0         0
2     1   0         1
      2   0         0
3     1   5         1
      2   4         0

```

I want to compute the column `last_sale`, where 1 and 0 are the date values when given an `ID`, `num_sold` was last non-zero. If there is no such last date (e.g. first month in dataset), it is -1 (or could be nan). 

In the given example, 

At date 1, ID 1 was not sold ever before so we set `last_sale` to -1. ID 2 was last sold in month 0, so we set `last_sale` to 0. 

Similarly, at date 3, ID 1 was last sold in month 1 so `last_sale` is 1, and ID 2 was last sold in month 0, so `last_sale` is 0.

What's the most efficient and concise way to accomplish this?