# system.dataset.dataSetToCSV

**URL:** <https://forum.inductiveautomation.com/t/system-dataset-datasettocsv/2018>\
**Category:** Ignition\
**Created:** [July 9, 2010, 8:14am UTC](https://forum.inductiveautomation.com/t/system-dataset-datasettocsv/2018 "2010-07-09T08:14:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [July 9, 2010, 8:14am UTC](https://forum.inductiveautomation.com/t/system-dataset-datasettocsv/2018/1 "2010-07-09T08:14:26Z")

</div>

system.dataset.dataSetToCSV returns a dataset as a sequence of comma separated variables, with each line of the dataset separated by a carriage return. This means that if you pass it a vertical column of data (say from a list), it outputs a series of strings separated by carriage returns rather than commas.

Would it be possible if there is only one column of data in the dataset to return that column using commas to separate the strings?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 16, 2010, 12:04am UTC](https://forum.inductiveautomation.com/t/system-dataset-datasettocsv/2018/2 "2010-07-16T00:04:32Z")

</div>

I think it is important that dataSetToCSV behave in a consistent manner.

Don’t forget how easy it is to make your own CSV:

[code]data = … get your tall table  
data = system.dataset.toPyDataSet(data)

csv = “,”.join([’"%s"’%row[0] for row in data])

print csv[/code]

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [July 16, 2010, 7:09am UTC](https://forum.inductiveautomation.com/t/system-dataset-datasettocsv/2018/3 "2010-07-16T07:09:48Z")

</div>

Thanks Carl. That answers my question in [this post](http://inductiveautomation.com/forum/viewtopic.php?f=70&t=5287).
