Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
One-step creation of a Dataset with named columns
| ResourceFunction["DatasetWithHeaders"][data] creates a dataset from tabular data, using the first row as column names. | |
| ResourceFunction["DatasetWithHeaders"][data,columnNames] creates a dataset of the data with column names as specified in the list columnNames. | 
Have all data in one list, with the first row defining the column names:
| In[1]:= | ![data = {{"a", "b", "c"}, {1, 2, 3}, {1, 2, 3}};
ResourceFunction["DatasetWithHeaders"][data]](https://www.wolframcloud.com/obj/resourcesystem/images/495/49505a7e-f65d-423b-a1b2-53e92ab9a80b/6e27954fe21c6484.png) | 
| Out[2]= |  | 
Data and column names stored in separate lists:
| In[3]:= | ![values = {{1, 2, 3}, {1, 2, 3}};
names = {"a", "b", "c"};
ResourceFunction["DatasetWithHeaders"][values, names]](https://www.wolframcloud.com/obj/resourcesystem/images/495/49505a7e-f65d-423b-a1b2-53e92ab9a80b/20b45502f53d678b.png) | 
| Out[5]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License