# Converting a python list to a dataset

**URL:** <https://forum.inductiveautomation.com/t/converting-a-python-list-to-a-dataset/9348>\
**Category:** Ignition\
**Created:** [November 17, 2014, 7:27pm UTC](https://forum.inductiveautomation.com/t/converting-a-python-list-to-a-dataset/9348 "2014-11-17T19:27:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [November 17, 2014, 7:27pm UTC](https://forum.inductiveautomation.com/t/converting-a-python-list-to-a-dataset/9348/1 "2014-11-17T19:27:03Z")

</div>

I have a list of tag paths

```auto
paths = ["path/to/tag/1", "path/to/tag/2", "path/to/tag/3", "path/to/tag/4"]
```

when i use todataSet to make a dataset i get an error

```auto
system.dataset.toDataSet(paths)
```

error:  
TypeError: toDataSet(): 1st arg can’t be coerced to com.inductiveautomation.ignition.common.script.builtin.DatasetUtilities$PyDataSet

any suggestions? Thanks

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [November 17, 2014, 7:49pm UTC](https://forum.inductiveautomation.com/t/converting-a-python-list-to-a-dataset/9348/2 "2014-11-17T19:49:42Z")

</div>

Yes, you need to specify the column names for the dataset.

Also, the function takes a list of lists, not a list of strings.

This works:

`
paths = [[path] for path in paths]
system.dataset.toDataSet(["tags"],paths)`

More information here: [support.inductiveautomation.com … ataset.htm](https://support.inductiveautomation.com/usermanuals/ignition/index.html?system_dataset_todataset.htm)

Best,

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [November 17, 2014, 8:32pm UTC](https://forum.inductiveautomation.com/t/converting-a-python-list-to-a-dataset/9348/3 "2014-11-17T20:32:22Z")

</div>

i called support and they informed me of that. I didn’t need the header info so i left it off thinking it was optional.

Thanks for the help
