# Saving solution data from ODEIntegrator types

**URL:** <https://discourse.julialang.org/t/saving-solution-data-from-odeintegrator-types/55533>\
**Category:** General Usage\
**Tags:** diffeq\
**Created:** [February 18, 2021, 10:12am UTC](https://discourse.julialang.org/t/saving-solution-data-from-odeintegrator-types/55533 "2021-02-18T10:12:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [February 18, 2021, 10:12am UTC](https://discourse.julialang.org/t/saving-solution-data-from-odeintegrator-types/55533/1 "2021-02-18T10:12:56Z")

</div>

Hi all,

I’m not getting the output I expect when following the [I/O: Saving and Loading Solution Data](https://diffeq.sciml.ai/stable/features/io/#io) section of the DifferentialEquations.jl docs.

I’ve solved my ODE via the [integrator interface](https://diffeq.sciml.ai/stable/basics/integrator/#integrator), so my type looks like this:

```julia
julia> typeof(model.lake)
OrdinaryDiffEq.ODEIntegrator{OrdinaryDiffEq.Tsit5, true, Vector{Float64}, Nothing, Float64, LimnoSES.MartinParameters, Float64, Float64, Float64, Vector{Vector{Float64}}, SciMLBase.ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, LimnoSES.MartinParameters, SciMLBase.ODEFunction{true, typeof(LimnoSES.lake_dynamics!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true, typeof(LimnoSES.lake_dynamics!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}, SciMLBase.ODEFunction{true, typeof(LimnoSES.lake_dynamics!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), DiffEqBase.CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryMinHeap{Float64}, DataStructures.BinaryMinHeap{Float64}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}

julia> typeof(model.lake.sol)
SciMLBase.ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, LimnoSES.MartinParameters, SciMLBase.ODEFunction{true, typeof(LimnoSES.lake_dynamics!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true, typeof(LimnoSES.lake_dynamics!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}

```

When I try `df = DataFrame(model.lake.sol)`, rather than the timestamp and values of the solution, the dataframe looks like this:

```julia
3×13 DataFrame
 Row │ x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 ⋯
     │ Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 ⋯
─────┼─────────────────────────────────────────────────────────────────────────────────────────────
   1 │ 20.5172 20.5172 20.5172 20.5172 20.5172 20.5172 20.5172 20.5172 20.5172 20.5172 ⋯
   2 │ 1.7865 1.7865 1.7865 1.7865 1.7865 1.7865 1.7865 1.7865 1.7865 1.7865
   3 │ 56.8443 56.8443 56.8443 56.8443 56.8443 56.8443 56.8443 56.8443 56.8444 56.8444
                                                                                  3 columns omitted

```

It’s not obvious what I should do to get this to work as intended.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [February 18, 2021, 1:31pm UTC](https://discourse.julialang.org/t/saving-solution-data-from-odeintegrator-types/55533/2 "2021-02-18T13:31:44Z")

</div>

It’s a DataFrames.jl bug fixed in DataFrames.jl 1.0, or so I hear from the DF devs.

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [February 18, 2021, 1:39pm UTC](https://discourse.julialang.org/t/saving-solution-data-from-odeintegrator-types/55533/3 "2021-02-18T13:39:26Z")

</div>

Great! Thanks Chis. Will wait for the next release.
