# Taking Table Data without Headers

**URL:** <https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 3, 2022, 8:40pm UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980 "2022-04-03T20:40:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [April 3, 2022, 8:40pm UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/1 "2022-04-03T20:40:10Z")

</div>

Hi all,

I have a table full of data that I want to take out and put into an array. I initially put the data inside with a system.dataset.toDataSet(headers,data) function. Unfortunately, I am unable to now take the data out without the headers. e.g. it comes out as header: data instead of just data.

I tried to use the system.dataset.toDataSet without the header input but the data does not show up correctly. Any tips or solutions?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 3, 2022, 8:57pm UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/2 "2022-04-03T20:57:04Z")

</div>

Is your script in the view or on the gateway? If it’s in the view then I would be using  
`self.getSibling("Table").props.data`

---

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [April 3, 2022, 9:02pm UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/3 "2022-04-03T21:02:31Z")

</div>

Its on the view. This makes sense thank you - I went one way with the self.getSibling and completely forgot that I could go backwards to pull the data out again. Cheers

---

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [April 3, 2022, 9:23pm UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/4 "2022-04-03T21:23:09Z")

</div>

Just tested this, unfortunately it still brings in the column (title) in. Additionally, it includes the data inside as an array, with square brackets. e.g. comes out as [“data”] while I want the output to be “data”. Unfortunately I cannot use the remove function as my data has square brackets inside the string which I’d like to keep.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [April 4, 2022, 2:10am UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/5 "2022-04-04T02:10:43Z")

</div>

It would be useful to see your code. I suspect its a similar situation as our other topic, you have an object but think you have a value.

---

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [April 4, 2022, 2:47am UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/6 "2022-04-04T02:47:14Z")

</div>

Hi, I’ve attached the following code to make things clearer.  
Here is the code where I go into the tag and take data to put into the table: (Ignore the funny bit around line 12 it didn’t import nicely)

 ![table code](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a50237f208c55d3ce7f0733f664fc59596b8ae79.png)

```auto
path = []
tagDataset = []
blank = []
tagPath = []

#Set header for table
tagHeaders = ['Items']

#Browse to location of Control Modules and read all tags
browseTagArray = system.tag.browseTags("FolderA/FolderB/ItemNames", type = "")

#Go through the tags and write path to an array
for tag in browseTagArray:
	path.append(tag.fullPath)

#Read all tags in this array through path
values = system.tag.readAll(path)

for browseTag, QualifiedValue in zip(browseTagArray, values):
	tagPath.append([browseTag.fullPath]);

pathInfo = system.dataset.toDataSet(tagHeaders, tagPath)

table0 = self.getSibling("Table_0")
table0.props.data = pathInfo

#Call the table data (originally was put in a different event)
paths = self.getSibling("Table_0").props.data

```

This is what the table will look like  
 ![table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/acd9680be9359de71471ec93b6e91fe32b268d27.png)  
This is how I call the table info (on the press of a button)  
 ![code](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/137b0c9e381b3ab307754bb7a1c907cea1cca950.png)  
and finally, the output of the previous code  
 ![output](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/674d6e96813261a107d8f089e9f4133eae966dd0.png)

What I would like to do is get the data as is from the table, in string form as an array e.g. [’[default]FolderA/FolderB/ItemNames/ItemA’ , ‘[default]FolderA/FolderB/ItemNames/ItemB’,…]

(Updated with code in text)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 4, 2022, 6:02am UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/7 "2022-04-04T06:02:54Z")

</div>

Tip: post code, not pictures (unless it helps some other context). Use the `</>` code formatting button to preserve code indentation and apply syntax highlighting. That way we can copy and paste the code into our answers.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 4, 2022, 8:39am UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/8 "2022-04-04T08:39:34Z")

</div>

Is this the actual code you use, or did you change/remove things before posting it here ?  
The results from the tag reads are never used !

The whole thing can be simplified to this:

```python
headers = ['items']
paths = [tag.fullPath for tag in system.tag.browse("folder/path/")]

dataset = system.dataset.toDataSet(headers, paths)
table0.props.data = dataset
paths = self.getSibling("Table_0").props.data

```

Now, to answer your specific question, if you get a list of dictionaries and only want the values, well…

```python
[dict.values() for dict in list_of_dicts]

```

And if you want a list with the value of one key and not a list of lists:

```python
[dict['key'] for dict in list_of_dicts]

```

---

<div class="post-metadata">

**Author:** ![Casu](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Casu](https://forum.inductiveautomation.com/u/Casu)\
**Post date:** [April 4, 2022, 7:31pm UTC](https://forum.inductiveautomation.com/t/taking-table-data-without-headers/57980/9 "2022-04-04T19:31:49Z")

</div>

Sorry yeah, I changed things around due to privacy issues surrounding the tag/folder names - I tried to keep it consistent but I may have missed something - my apologies
