I have this dataframe:
testdf = pl.DataFrame({'date':['date1','date1','date1','date2','date3','date3'], 'factor':['A','B','C','B','B','C'], 'val':[1,2,3,3,1,5]})
Some of the factors are missing. I'd like to fill in the gaps with values 0. This is what it looks like.