# Error creating dataset

**URL:** <https://forum.inductiveautomation.com/t/error-creating-dataset/27008>\
**Category:** Ignition\
**Created:** [July 30, 2019, 5:49pm UTC](https://forum.inductiveautomation.com/t/error-creating-dataset/27008 "2019-07-30T17:49:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![waldner](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@waldner](https://forum.inductiveautomation.com/u/waldner)\
**Post date:** [July 30, 2019, 5:49pm UTC](https://forum.inductiveautomation.com/t/error-creating-dataset/27008/1 "2019-07-30T17:49:53Z")

</div>

I’m surely missing something here, but this produces an error:

```auto
h = ['machine', 'a1', 'a2']
l = [['NH TRACK', 0, 2.216666666666667], ['NH CR8.90 ', 4.675, 0], ['NH CR7.90', 2.6083333333333334, 0]]
d = system.dataset.toDataSet(h, l)

```

The error is:

```auto
jvm 1 | Caused by: org.python.core.PyException: Traceback (most recent call last):
jvm 1 | File "<function:updateData>", line 7, in updateData
jvm 1 | TypeError: Unable to convert row 1, column 1 to type class java.lang.Integer

```

Isn’t it possible to have floating point values in a dataset?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 30, 2019, 5:51pm UTC](https://forum.inductiveautomation.com/t/error-creating-dataset/27008/2 "2019-07-30T17:51:38Z")

</div>

Your first list:

```auto
['NH TRACK', 0, 2.216666666666667]

```

is defining the datatypes (string, int, float)

Then your second list uses different types:

```auto
['NH CR8.90 ', 4.675, 0]

```

(string, float, int)

Try using `0.0` instead of `0` and see if I’m totally wrong or not 🙂

---

<div class="post-metadata">

**Author:** ![waldner](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@waldner](https://forum.inductiveautomation.com/u/waldner)\
**Post date:** [July 30, 2019, 5:53pm UTC](https://forum.inductiveautomation.com/t/error-creating-dataset/27008/3 "2019-07-30T17:53:03Z")

</div>

Ok, that was it indeed. Thanks!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 30, 2019, 5:54pm UTC](https://forum.inductiveautomation.com/t/error-creating-dataset/27008/4 "2019-07-30T17:54:31Z")

</div>

A more verbose, but also more explicit option is to use the [`DatasetBuilder`](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.1/com/inductiveautomation/ignition/common/util/DatasetBuilder.html) class; that way you can specify your datatypes manually.
