# Create DataFrame from data in DataFrameRow

**URL:** <https://discourse.julialang.org/t/create-dataframe-from-data-in-dataframerow/122431>\
**Category:** Data\
**Tags:** dataframesmeta\
**Created:** [November 8, 2024, 9:38pm UTC](https://discourse.julialang.org/t/create-dataframe-from-data-in-dataframerow/122431 "2024-11-08T21:38:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [November 8, 2024, 10:59pm UTC](https://discourse.julialang.org/t/create-dataframe-from-data-in-dataframerow/122431/3 "2024-11-08T22:59:42Z")

</div>

a bit of a tortuous path, but it seems to get the desired shape while remaining within the context of the DataFrames package

```julia
sdf=stack(DataFrame(dfrow),names(dfrow))

sdf1=select(sdf,:value, :variable => ByRow(r->split(r,limit=2))=>[:Element,:mM,])

unstack(sdf1,:mM,:value)

```

---

_[View the full topic](https://discourse.julialang.org/t/create-dataframe-from-data-in-dataframerow/122431)._
