# Converting Dense Axis array results into dataframe

**URL:** https://discourse.julialang.org/t/converting-dense-axis-array-results-into-dataframe/83780
**Category:** Optimization (Mathematical)
**Tags:** jump, dataframes
**Created:** [July 5, 2022, 3:18pm UTC](https://discourse.julialang.org/t/converting-dense-axis-array-results-into-dataframe/83780 "2022-07-05T15:18:04Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)
#### Post date: [July 6, 2022, 2:50am UTC](https://discourse.julialang.org/t/converting-dense-axis-array-results-into-dataframe/83780/5 "2022-07-06T02:50:47Z")

</div>

This hopefully still works:

> [@Extracting JuMP results](https://discourse.julialang.org/t/extracting-jump-results/51429/6):
>
> In regards to Question 1., this is the code I use to convert optimisation results to DataFrames: """ Returns a `DataFrame` with the values of the variables from the JuMP container `var`. The column names of the `DataFrame` can be specified for the indexing columns in `dim_names`, and the name of the data value column by a Symbol `value_col` e.g. :Value """ function convert\_jump\_container\_to\_df(var::JuMP.Containers.DenseAxisArray; dim\_names::Vector{Symbol}=Vector{Symbol}(), value\_col::Sy…

You can then do an `DataFrames.unstack` to pivot the table.

---

_[View the full topic](https://discourse.julialang.org/t/converting-dense-axis-array-results-into-dataframe/83780)._
