I want to do the interpolation for last copper price. However, original data has missing rows for date. I would want to first fill in rows for missing date with other variables with value 0 and then do the interpolation, but I do not know how to do it.
The date looks like this:
TransactionDate last closingbid closingask
1/1/1904
1/2/1904 6 6.25
1/4/1904 5 7
1/5/1904 7 5.5 6.25
1/6/1904 6 5.75 6.5
1/8/1904 5.75 7
1/9/1904 6 9
1/9/1904 6
1/11/1904 6.75 8.5
1/12/1904 6.25 6 8
1/13/1904 6.25 8
1/14/1904 6.25 8
1/15/1904 6.25 8
1/16/1904 6.25
1/18/1904 6.25 8
1/19/1904 8 6.25 8
1/20/1904 6.25 9
1/21/1904 6 9
1/22/1904 6 9
1/23/1904 8
1/25/1904 6 9
1/26/1904 6 9
1/27/1904 7 10
1/28/1904 7 10
1/29/1904 7 10
1/30/1904 7 10
The date looks like this:
TransactionDate last closingbid closingask
1/1/1904
1/2/1904 6 6.25
1/4/1904 5 7
1/5/1904 7 5.5 6.25
1/6/1904 6 5.75 6.5
1/8/1904 5.75 7
1/9/1904 6 9
1/9/1904 6
1/11/1904 6.75 8.5
1/12/1904 6.25 6 8
1/13/1904 6.25 8
1/14/1904 6.25 8
1/15/1904 6.25 8
1/16/1904 6.25
1/18/1904 6.25 8
1/19/1904 8 6.25 8
1/20/1904 6.25 9
1/21/1904 6 9
1/22/1904 6 9
1/23/1904 8
1/25/1904 6 9
1/26/1904 6 9
1/27/1904 7 10
1/28/1904 7 10
1/29/1904 7 10
1/30/1904 7 10

Comment