TPL
class
rackio_AI.TPL()TPL class allows to you load into RackioAI .tpl files in pandas.DataFrame format.
init(self)read(self, name)Read .tpl files
Paramaters
- :param name: (str) if name is a directory, it reads all .tpl files in that directory. If name is a .tpl file, it reads only that file
:return:
- doc: (list[dict]) tpl file reaformated in dictionaries
Snippet code
>>> import os
>>> from rackio_AI import RackioAI, get_directory
>>> name = os.path.join(get_directory('Leak'), 'Leak01.tpl')
>>> RackioAI.load(name)
tag TIME_SERIES PT_SECTION_BRANCH_TUBERIA_PIPE_Pipe60_NR_1 ... CONTR_CONTROLLER_CONTROL_FUGA file
variable Pressure ... Controller_output filename
unit S PA ... .tpl
0 0.000000 568097.3 ... 0.0 Leak01
1 0.502732 568098.2 ... 0.0 Leak01
2 1.232772 568783.2 ... 0.0 Leak01
3 1.653696 569367.3 ... 0.0 Leak01
4 2.200430 569933.5 ... 0.0 Leak01
... ... ... ... ... ...
3214 1618.327000 569341.1 ... 0.0 Leak01
3215 1618.849000 569341.3 ... 0.0 Leak01
3216 1619.370000 569341.5 ... 0.0 Leak01
3217 1619.892000 569341.7 ... 0.0 Leak01
3218 1620.413000 569341.9 ... 0.0 Leak01
<BLANKLINE>
[3219 rows x 12 columns]
to(self, data_type, **kwargs)This method allows to you transform from .tpl to a 'data_type'
Parameers
- :param data_type: (str) 'dataframe' - 'series' - 'csv'
- :param kwargs:
- filename: (str) 'name.csv' if date_type == 'csv'
- path: (str ) path to save csv file
:return: