# How would I convert the key value pairs of an accumulator data structure to a dataframe

**URL:** <https://discourse.julialang.org/t/how-would-i-convert-the-key-value-pairs-of-an-accumulator-data-structure-to-a-dataframe/34438>\
**Category:** General Usage\
**Created:** [February 10, 2020, 9:18pm UTC](https://discourse.julialang.org/t/how-would-i-convert-the-key-value-pairs-of-an-accumulator-data-structure-to-a-dataframe/34438 "2020-02-10T21:18:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julia1](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Post date:** [February 10, 2020, 9:18pm UTC](https://discourse.julialang.org/t/how-would-i-convert-the-key-value-pairs-of-an-accumulator-data-structure-to-a-dataframe/34438/1 "2020-02-10T21:18:07Z")

</div>

Hi,  
I’m using the count function from the accumulator data structure from DataStructures.jl, and I’m getting exactly what I need, but I’m having a tough time extracting the values. I went to the source code and there are some methods to call values and keys, but it still stays in that accumulator form.

I’m used to Python where there are methods like to\_list() etc… essentially I just want the count accumulator keys to be columns of a dataframe and the one row of the dataframe to be the count values

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 11, 2020, 7:58am UTC](https://discourse.julialang.org/t/how-would-i-convert-the-key-value-pairs-of-an-accumulator-data-structure-to-a-dataframe/34438/2 "2020-02-11T07:58:32Z")

</div>

Please post an MWE we can run.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …
