Column View of a DataSet

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

Hi dnicoll,

You will have to transform it yourself unless you use the MutablePyDataSet from the Power Scripting Module.

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”],
data = pa.dataset.toData(columnNames, rows)
dataCol = pa.dataset.toData()
dataCol.insertColumn(0, “names”, data[0])
print dataCol
row | names

0 | Bob
1 | 32
2 | Private