# Given an object, return Julia code that defines the object

**URL:** https://discourse.julialang.org/t/given-an-object-return-julia-code-that-defines-the-object/80579
**Category:** General Usage
**Created:** [May 5, 2022, 11:59pm UTC](https://discourse.julialang.org/t/given-an-object-return-julia-code-that-defines-the-object/80579 "2022-05-05T23:59:28Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [May 6, 2022, 1:11am UTC](https://discourse.julialang.org/t/given-an-object-return-julia-code-that-defines-the-object/80579/12 "2022-05-06T01:11:16Z")

</div>

```julia
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

---

_[View the full topic](https://discourse.julialang.org/t/given-an-object-return-julia-code-that-defines-the-object/80579)._
