Gurobi / gurobipy-pandas

Convenience wrapper for building optimization models from pandas data
https://gurobipy-pandas.readthedocs.io
Apache License 2.0
92 stars 15 forks source link

Implement conversion to MLinExpr in dataframe accessors #52

Closed simonbowly closed 1 year ago

simonbowly commented 1 year ago

To aid integration with gurobi-machinelearning, it would be useful to be able to extract 2D MLinExpr from a pandas dataframe containing a mix of modelling objects and data.

df.values  # pandas built-in: return a numpy array containing the data
df.gppd.to_expr()  # return an MLinExpr
simonbowly commented 1 year ago

Decided this isn't needed, the conversion is handled directly in gurobi-ml and likely isn't useful elsewhere.