Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python_coupling [2020/02/18 11:00]
argemiro
python_coupling [2023/07/13 15:23] (current)
admin
Line 1: Line 1:
 +{{ :​logo_logo.png?​400 |}}
 +\\
 +\\
 ====== Dinamica EGO and Python Coupling ====== ====== Dinamica EGO and Python Coupling ======
- 
-Python support is present in the "​Python"​ branch in the repositories (on top of the "​Tasks"​ branch). To compile the branch, it is necessary to have Python dependencies in dff_dependencies_windows. The version containing the dependencies can be downloaded at [[http://​csr.ufmg.br/​~romulo/​dff_dependencies_windows_python.7z]]. For execution, it is necessary to have the folder "​PyEnvironment"​ inside the Dinamica folder, the PyEnvironment can also be obtained in [[http://​csr.ufmg.br/​~romulo/​PyEnvironment.7z]]. 
  
 === Example: Calculate Python Expression === === Example: Calculate Python Expression ===
Line 62: Line 63:
 | prepareLookupTable | It returns the lookup table prepared to output. The lut has to be in the form [[[key,​value][line1]...[lineM]]] where the first list contains the headers of the table and all the other lists are lines containing the data. | list(list) lut | | prepareLookupTable | It returns the lookup table prepared to output. The lut has to be in the form [[[key,​value][line1]...[lineM]]] where the first list contains the headers of the table and all the other lists are lines containing the data. | list(list) lut |
 | toTable | It returns a valid representation of dinamica table to output. Input Table can be: [[[header1...headerN][line1]...[lineM]]] where the first list contains the headers of the table and all the other lists are lines containing the data; {header1: [valuesOfColumn1],​ header2: [valuesOfColumn2]...} where the valuesOfComlumn#​ are all values of that column in table; [[(header1...headerN)(line)...(lineM)]] where the first tuple contains the headers of the table and all the other tuples are lines containing the data; [value1, value2, ..., valueN], those are the values for a lookup table with sequential key; pandas.Dataframe is a commom structure table used to manipulate CSVs; numpy.array is a commom structure for matrix, that can be tables as well. The first line of matrix needs to be the table header. | list(list);​dict(list);​list(tuple);​list;​pandas.DataFrame;​numpy.array inputTable | | toTable | It returns a valid representation of dinamica table to output. Input Table can be: [[[header1...headerN][line1]...[lineM]]] where the first list contains the headers of the table and all the other lists are lines containing the data; {header1: [valuesOfColumn1],​ header2: [valuesOfColumn2]...} where the valuesOfComlumn#​ are all values of that column in table; [[(header1...headerN)(line)...(lineM)]] where the first tuple contains the headers of the table and all the other tuples are lines containing the data; [value1, value2, ..., valueN], those are the values for a lookup table with sequential key; pandas.Dataframe is a commom structure table used to manipulate CSVs; numpy.array is a commom structure for matrix, that can be tables as well. The first line of matrix needs to be the table header. | list(list);​dict(list);​list(tuple);​list;​pandas.DataFrame;​numpy.array inputTable |
 +
 +See the documentation about [[Calculate Python Expression]] for further information about to use Python together with Dinamica EGO.
  
 \\ \\