# System DataSet to todataset, IndexError: Row 0 doesn't have the same number of columns as header list

**URL:** <https://forum.inductiveautomation.com/t/system-dataset-to-todataset-indexerror-row-0-doesnt-have-the-same-number-of-columns-as-header-list/74287>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 30, 2023, 11:05am UTC](https://forum.inductiveautomation.com/t/system-dataset-to-todataset-indexerror-row-0-doesnt-have-the-same-number-of-columns-as-header-list/74287 "2023-05-30T11:05:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hans\_odgaard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hans_odgaard/32/83110_2.png) [@hans\_odgaard](https://forum.inductiveautomation.com/u/hans_odgaard)\
**Post date:** [May 30, 2023, 11:05am UTC](https://forum.inductiveautomation.com/t/system-dataset-to-todataset-indexerror-row-0-doesnt-have-the-same-number-of-columns-as-header-list/74287/1 "2023-05-30T11:05:40Z")

</div>

I know this has been asked before , however I need some light at the end of the tunnel.  
The length of both data lists are the same, so what I'm missing here.

 ![2023-05-30_13-04-19](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c87365b0598dee0c5099fbedfcb569d84e4e7fec.png)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 30, 2023, 11:25am UTC](https://forum.inductiveautomation.com/t/system-dataset-to-todataset-indexerror-row-0-doesnt-have-the-same-number-of-columns-as-header-list/74287/2 "2023-05-30T11:25:47Z")

</div>

Put square brackets around test2 to make it a list of lists, or perhaps better stated: a list of rows.  
`system.dataset.toDataSet(newHeader, [test2])`

In this case, the length should be one, since there is only one row, and the row should have 4 elements, since there are 4 columns.
