Errors loading dataframes from JLD files in Pluto

I load a df from a *.jld file and try to do stuff with one of the columns.

In VS Code, it works, but in in Pluto, I get errors.

I’ve tried a couple different ways of indexing the df, but I’m not sure how to get into the df that was loaded.

Working fine in VS Code.

using DataFrames, JLD
df = DataFrame()
push!(df, (a=1, b=2))
save(joinpath("data.jld"), "df", df)
df2 = load("data.jld","df")
df2.a
1-element Vector{Int64}:
 1

Not working in Pluto.

begin
	using DataFrames, JLD
	df = DataFrame()
	push!(df, (a=1, b=2))
	save(joinpath("data.jld"), "df", df)
	df2 = load("data.jld","df")
end

(not sure how to best copy and paste the cell output)

JLD.var"##DataFrames.DataFrame#442"
columns
AbstractVector{T} where T
Int64

1

Int64

2

colindex
JLD.var"##DataFrames.Index#445"
lookup
JLD.var"##JLD.AssociativeWrapper{Core.Symbol,Core.Int64,Base.Dict{Core.Symbol,Core.Int64}}#448"
keys
Symbol

:a

:b

values
Int64

1

2

names
Symbol

:a

:b

The data seems to load without errors, but I can’t figure out how to use it:

df2.a
type ##DataFrames.DataFrame#442 has no field a

    getproperty(::JLD.var"##DataFrames.DataFrame#442", ::Symbol)@Base.jl:33
    top-level scope@Local: 1[inlined]

The problem is bypassed by saving the dataframe with JLD2 rather than JLD and using JLD2 to open in the Pluto notebook.