Optimization, Operations Research, Data Science, Hands On Tutorials, Python.
model.x: results.loc[i, j] = model.x[i, j].value Which should return something like this. +---+---------+----------+----------+----------+ | | A | B | C | D | +---+---------+----------+----------+----------+ | 1 | 0.0 | 2.0 | 0.0 | 12.0 | | 2 | 0.0 | 13.0 | 13.0 | 0.0 | | 3 | 5.0 | 0.0 | 0.0 | 5.0