# \#unstack

**URL:** https://discourse.julialang.org/tag/unstack/974.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Unsure how to solve error message when applying unstack to DataFrame](https://discourse.julialang.org/t/unsure-how-to-solve-error-message-when-applying-unstack-to-dataframe/114214)

<div class="topic-metadata">

**Author:** [@Lee\_Phillips](https://discourse.julialang.org/u/Lee_Phillips)\
**Replies:** 6\
**Last updated:** [May 14, 2024, 10:33pm UTC](https://discourse.julialang.org/t/unsure-how-to-solve-error-message-when-applying-unstack-to-dataframe/114214 "2024-05-14T22:33:37Z")

</div>

Hello All I have a dataframe, the first 5 rows are shown below 5×4 DataFrame Row │ PointAID\_FK PointBID\_FK Distance Time │ Any Any Float64 Float64 ─────┼────────────────────────────────────…

---

## [Reshaping dataframe](https://discourse.julialang.org/t/reshaping-dataframe/78020)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 13\
**Last updated:** [March 17, 2022, 2:52pm UTC](https://discourse.julialang.org/t/reshaping-dataframe/78020 "2022-03-17T14:52:34Z")

</div>

I show a way to transform the starting table to have only one “X” per row. I ask for comments on how to do the various steps differently and / or better. For example how to insert an “index” column or how to filter the…
