我有一张表格,显示日期和数量。我想继续显示日期,但是如果1天没有数据,则假设日期为星期五,它将显示(sat | 0)。
|day|qty|
|mon| 1 |
|wed| 3 |
|thu| 4 |
|fri| 5 |
|mon| 1 |
|tue| 2 |
|wed| 3 |
|thu| 4 |
|fri| 5 |
|sat| 6 |
|mon| 1 |
|tue| 2 |
|wed| 3 |
|thu| 4 |
|fri| 5 |
|sat| 6 |
|sat| 7 |
输出应如下所示
|day|qty|
|mon| 1 |
|tue| 0 | -->> added row
|wed| 3 |
|thu| 4 |
|fri| 5 |
|sat| 0 | ->>> added row
|sun| 0 | ->> added row
|mon| 1 |
|tue| 2 |
|wed| 3 |
|thu| 4 |
|fri| 5 |
|sat| 6 |
|sun| 0 | ->> added row
|mon| 1 |
|tue| 2 |
|wed| 3 |
|thu| 4 |
|fri| 5 |
|sat| 6 |
|sun| 7 |