Data from gurobi to Excel using gurobi.getAttr
AnsweredHello,
I hope you are doing very well,
I want to use the function "model.getAttr()" in order to write data into excel (and not use Var.x with the loops) but i don't see how i can exploit that; I'll be very gratefull for your help.
Best regards,
Thank you.
1
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Hamza!
There is no built-in way to generate Excel tables with Gurobi.
Luckily, it's very straightforward to save pandas DataFrames from Python to Excel sheets. We do this in the Gurobi/grblogtools package on GitHub. Please refer to the official documentation about the functionality or check out this tutorial How to Work with Excel files in Pandas | by Dorian Lazar | Towards Data Science.
I hope this helps.
Cheers,
Matthias1
Post is closed for comments.
Comments
2 comments