I have a data frame :
df = pd.DataFrame(rows,columns=['proid','sku', 'qty'])
and a list of unique skus
skus = ["SKU1", "SKU2", "SKU3"]
Now df may not contain rows for all combinations proid and sku where sku are from uniq list skus
e.g.:
# proid sku qty
# 1 p1 SKU1 1
# 2 p1 SKU3 2
# 3 p2 SKU1 3
I want to add rows to data frame in such a way that all proid sku combinations exist with default 0 values
result:
# proid sku qty
# 1 p1 SKU1 1
# 2 p1 SKU3 2
# 3 p2 SKU1 3
# 4 p1 SKU2 0
# 5 p2 SKU2 0
# 6 p2 SKU3 0