[英] How to fill the missing dates for multiple columns combination with NaN value
My df looks like the following:
ds | col1 | col2 |col3 |values
01/01/2020. x0. y0. z0. 12
01/02/2020. x0. y0. z0. 11
01/03/2020. x1. y0. z0. 14
01/02/2020. x0. y1. z0. 19
01/03/2020. x0. y1. z0. 11
wif a fixed start date= 01/01/2020 and end date=01/03/2020, me want to fill the missing dates value for each combinations of col1, col2, and col3. The output should be the following:
ds | col1 | col2 |col3 |values
01/01/2020. x0. y0. z0. 12
01/02/2020. x0. y0. z0. 11
01/03/2020. x0. y0. z0. NaN
01/01/2020. x1. y0. z0. Nan
01/02/2020. x1. y0. z0. Nan
01/03/2020. x1. y0. z0. 14
01/01/2020. x0. y1. z0. Nan
01/02/2020. x0. y1. z0. 19
01/03/2020. x0. y1. z0. 11