# Column View of a DataSet

**URL:** <https://forum.inductiveautomation.com/t/column-view-of-a-dataset/12587>\
**Category:** Ignition\
**Created:** [January 21, 2017, 9:32am UTC](https://forum.inductiveautomation.com/t/column-view-of-a-dataset/12587 "2017-01-21T09:32:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnicoll](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dnicoll](https://forum.inductiveautomation.com/u/dnicoll)\
**Post date:** [January 21, 2017, 9:32am UTC](https://forum.inductiveautomation.com/t/column-view-of-a-dataset/12587/1 "2017-01-21T09:32:13Z")

</div>

I may be missing something here. Is there a way to view the data from a sql query which is in a dataset in column form? Or do I have to roll it myself? I have a row containing equipment details which I want to show as a column of data rather than a row. I guess I could transform the data set myself but is seems a bit clunky

---

<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:** [January 21, 2017, 11:22pm UTC](https://forum.inductiveautomation.com/t/column-view-of-a-dataset/12587/2 "2017-01-21T23:22:48Z")

</div>

Hi dnicoll,

You will have to transform it yourself unless you use the [MutablePyDataSet](http://doc.perfectabstractions.com/modules/powerscripting/mutablepydataset.html) from the [Power Scripting Module](http://www.perfectabstractions.com/products.html).

The MutablePyDataSet provides many methods and ways to easily transform and manipulate a dataset.

Here is an example using a MutablePyDataSet that takes a row and transforms it into a column:

## [code]columnNames = [“name”,“age”,“rank”] rows = [[“Bob”,32,“Private”], [“Bill”,28,“Major”], [“Sarah”,34,“Colonel”], [“Kane”,56,“General”], [“Kirk”,46,“Captain”]] data = pa.dataset.toData(columnNames, rows) dataCol = pa.dataset.toData() dataCol.insertColumn(0, “names”, data[0]) print dataCol Output: row | names

0 | Bob  
1 | 32  
2 | Private  
[/code]Best,
