I have a table (AnnualPurchase). I have sources in rows, and years in columns.
I solve an optimization model that determines how much I should buy from each source. The results will be output in another table, but the point is since I'm not buying from all of my sources, the supplier column is shorter than the original list.
I want to write a code that creates Table 2, based on Table 1.
Table 1
1 2
1 30 40
3 20
5 25
Table 2
1 2
1 30 40
2
3 20
4
5 25
I have writtten a very basic code, which doesn't work!
Any comment is appreciated
Bookmarks