# Use a String For a Variable name and convert Dictionaries to DataFrames

**URL:** <https://discourse.julialang.org/t/use-a-string-for-a-variable-name-and-convert-dictionaries-to-dataframes/62107>\
**Category:** General Usage\
**Tags:** question, package, dictionary, dataframes\
**Created:** [May 31, 2021, 4:35am UTC](https://discourse.julialang.org/t/use-a-string-for-a-variable-name-and-convert-dictionaries-to-dataframes/62107 "2021-05-31T04:35:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [May 31, 2021, 4:56am UTC](https://discourse.julialang.org/t/use-a-string-for-a-variable-name-and-convert-dictionaries-to-dataframes/62107/2 "2021-05-31T04:56:58Z")

</div>

do you have a SAS background or something? wondering why u r using a macro. I didn’t read the code as it’s too long.

If you can simplify your problem and make an Minimal Working Example by following this guide

> [@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 …

An example is this really easy to follow post on how to ask question to maximize the chances of getting help:

> [@Sub-sample array until a target number of unique elements is left](https://discourse.julialang.org/t/sub-sample-array-until-a-target-number-of-unique-elements-is-left/61981):
>
> Hey! I’m in need of a fast method that uniformly subsamples the elements of a given array until only a specified number of unique elements is left. For example input array=[4,1,2,2,4] and target\_unique\_el=2, then the (random) result could be res=[4,2,2] (as it has two unique elements left). My current implementation is: using Random using BenchmarkTools function subsample\_unique!(array, target\_unique\_el) shuffle!(array) # for uniform sampling unique\_el = length(Set(array)) while …

For me, the original is too long and the code is too long. So I just switched and don’t wanna do it. I’d say, the more prep work you do the more likely you will get help in a timely manner.

---

_[View the full topic](https://discourse.julialang.org/t/use-a-string-for-a-variable-name-and-convert-dictionaries-to-dataframes/62107)._
