linopy.expressions.QuadraticExpression.to_polars#
- QuadraticExpression.to_polars(**kwargs)#
Convert the expression to a polars DataFrame.
The resulting DataFrame represents a long table format of the all non-masked expressions with non-zero coefficients. It contains the columns vars1, vars2, coeffs, const. If the expression is constant, the vars1 and vars2 and coeffs columns will be null.
- Returns:
df (
polars.DataFrame)