Given an object, return Julia code that defines the object

julia> let df = DataFrame(a=[1]); invoke(show, Tuple{typeof(stdout), Any}, stdout, df) end
DataFrame(AbstractVector[[1]], DataFrames.Index(Dict(:a => 1), [:a]))

DataFrames.jl could probably make this easier, perhaps with repr . cc @bkamins

2 Likes