# Ignition dataset tag to python dataset

**URL:** <https://forum.inductiveautomation.com/t/ignition-dataset-tag-to-python-dataset/18516>\
**Category:** Ignition\
**Tags:** python\
**Created:** [June 18, 2018, 7:47pm UTC](https://forum.inductiveautomation.com/t/ignition-dataset-tag-to-python-dataset/18516 "2018-06-18T19:47:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [June 18, 2018, 7:47pm UTC](https://forum.inductiveautomation.com/t/ignition-dataset-tag-to-python-dataset/18516/1 "2018-06-18T19:47:59Z")

</div>

Hi,   
 I currently have a memory tag that is a dataset type. I want to convert the dataset within this tag to a python dataset so that I can manipulate the data within a script. I haven’t been able to find any way to do this. I know that I can use the “.toPyDataSet” command but everytime I try this I get this error:   
   
TypeError: toPyDataSet(): 1st arg can’t be coerced to com.inductiveautomation.ignition.common.Dataset   
   
 This is occurring after simply trying to pass the tag into the function. Obviously this isn’t right. Any help is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [June 18, 2018, 7:56pm UTC](https://forum.inductiveautomation.com/t/ignition-dataset-tag-to-python-dataset/18516/2 "2018-06-18T19:56:31Z")

</div>

Could you try posting your code? It’s a little be easier to offer suggestions if we can see what you have thus far.

Based on the error, it sounds like the parameter you’re passing to `system.dataset.toPyDataSet` isn’t actually the value of the memory tag. Is your code using [system.tag.read](https://docs.inductiveautomation.com/display/DOC79/system.tag.read), and is it referencing the value submember?

```auto
memoryDataSet = system.tag.read("myTagPath").value
pyData = system.dataset.toPyDataSet(memoryDataSet)

```

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [June 18, 2018, 7:58pm UTC](https://forum.inductiveautomation.com/t/ignition-dataset-tag-to-python-dataset/18516/3 "2018-06-18T19:58:10Z")

</div>

I’m guessing you’re reading it with system.tag.read()? If so make sure to add .value after, like

```auto
pyDS = system.dataset.toPyDataSet(system.tag.read(pathHere).value)

```

The object returned by system.tag.read is a qualified value, which means it isn’t technically the value you’re looking for yet.
