Skip to content
Snippets Groups Projects
Commit 7b1a70c6 authored by Paulus Kruger's avatar Paulus Kruger
Browse files

test notebook doc

parent 40780f88
Branches pypcc2
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
## Reading variable info from (APSCT translator) config file
%% Cell type:code id: tags:
``` python
import yamlconfig as yc
import pandas as pd
pd.options.display.max_columns=0
```
%% Cell type:code id: tags:
``` python
def YamlTable(data,columns,cutcolums=[],cutfunction=False,fillnan=""):
X=pd.DataFrame(data,columns=columns+cutcolums)
X=X.fillna(fillnan)
if cutfunction:
X=X.loc[cutfunction, columns]
C = X.style.set_properties(**{'text-align': 'left'})
return C
```
%% Cell type:code id: tags:
``` python
RCU=yc.yamlconfig("RCU")
```
%% Cell type:markdown id: tags:
## RCU OPC_UA variables
%% Cell type:code id: tags:
``` python
YamlTable(RCU.getvars(),['name','rw','dtype','dim','mask','description'],
['debug'],lambda df: df['debug']=="")
```
%% Output
<pandas.io.formats.style.Styler at 0x7f62388d4160>
%% Cell type:markdown id: tags:
## RCU OPC_UA method calls
After call, RCU_translator_busy will be True until finished.
%% Cell type:code id: tags:
``` python
YamlTable(RCU.conf['methods'],['name','mask','description'],
['debug'],lambda df: df['debug']=="")
```
%% Output
<pandas.io.formats.style.Styler at 0x7f6238929b70>
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment