Because this is so common, there are special functions under system.dataset that are designed for this. So to change a dataset, you really create a new one and then replace the old one with the new one. Datasets are immutable, meaning they cannot change. # Pull the dataset property off a Table componentĭata = ("Table").data column can be either an integer or a column name, which is treated case-insensitive.įor example, you could iterate through every item in a DataSet in scripting like this: GetValueAt(row, column) Returns the value from the dataset at the given location. GetColumnName(index) Returns the name of the column at the given index. RowCount Returns the number of rows in the dataset.ĬolumnCount Returns the number of columns in the dataset. Accessing data in a DataSetĭataSets have various properties and functions that you can access through Python. You can convert between the two with and. The PyDataSet is a wrapper type that you can use to make DataSets more accessible in Python. DataSet is the kind of object that Ignition uses internally to represents datasets. When you get the data property out of a Table, for example, you'll get a DataSet. The main confusion when dealing with datasets is the difference between the DataSet object and the PyDataSet object. The system.dataset library provides various functions for manipulating and creating datasets. It is very common to deal with datasets in scripting, as datasets power many of the interesting features in Ignition, like charts and tables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |