# How to use Datasets tags with python scripts

**URL:** <https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104>\
**Category:** Ignition\
**Tags:** python, ignition81\
**Created:** [August 23, 2024, 8:45pm UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104 "2024-08-23T20:45:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Daniel\_Hernande](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@Jose\_Daniel\_Hernande](https://forum.inductiveautomation.com/u/Jose_Daniel_Hernande)\
**Post date:** [August 23, 2024, 8:45pm UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/1 "2024-08-23T20:45:55Z")

</div>

Hello.

I want to create a dataset tag to store certain values as in a table from a value change script and I can not find any examples in the documentation.

Can someone post an example of how to insert, delete and read rows from a dataset.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 23, 2024, 8:53pm UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/2 "2024-08-23T20:53:48Z")

</div>

It's all here:

> **[system.dataset | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-dataset)**
>
> Dataset Functions

Do note that datasets must not be modified in place. Modifications, whether via those functions or otherwise, create a complete new dataset that is to be written back to the source.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [August 24, 2024, 11:58am UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/3 "2024-08-24T11:58:36Z")

</div>

Also a video that might be helpful for you.

> **[Working with Datasets Video at Inductive University](https://www.inductiveuniversity.com/videos/working-with-datasets/8.1)**
>
> Learn how to use dataset objects from a script.

---

<div class="post-metadata">

**Author:** ![Jose\_Daniel\_Hernande](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@Jose\_Daniel\_Hernande](https://forum.inductiveautomation.com/u/Jose_Daniel_Hernande)\
**Post date:** [August 26, 2024, 6:57pm UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/4 "2024-08-26T18:57:55Z")

</div>

Hello.

I do not understand the objective of the Datasets if are mostly immutable.

Or I am not understanding properly.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 26, 2024, 7:46pm UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/5 "2024-08-26T19:46:41Z")

</div>

That datasets are immutable, really only means that they can not be modified in place. This doesn't mean that they cant be used.

For instance to add rows you would use `system.dataset.addRows()` this function takes a dataset and the rows you want to add, and returns a new dataset object that has all of the previous datasets rows plus those you wanted added.

There are similar methods for adding/removing columns, and removing rows.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 27, 2024, 1:43am UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/6 "2024-08-27T01:43:28Z")

</div>

> [@Jose\_Daniel\_Hernande](#):
>
> understanding properly.

The key to the rule is that Ignition's event system, which drives all subscription and binding technologies, needs to focus on objects that _know_ when they are changing, so they can notify interested parties (bindings). Individual cells of a dataset cannot do this, nor can members of document tags. For such objects, the notification trigger is replacement of the **object** --the whole thing.

It is **possible** to change such things _in place_, but nothing else will **notice**.

---

<div class="post-metadata">

**Author:** ![Jose\_Daniel\_Hernande](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@Jose\_Daniel\_Hernande](https://forum.inductiveautomation.com/u/Jose_Daniel_Hernande)\
**Post date:** [August 27, 2024, 4:56am UTC](https://forum.inductiveautomation.com/t/how-to-use-datasets-tags-with-python-scripts/95104/7 "2024-08-27T04:56:46Z")

</div>

Ok, now I got it.
