Differences

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

Link to this comparison view

Both sides previous revision Previous revision
calculate_python_expression [2026/07/22 03:42]
hermann
calculate_python_expression [2026/07/22 18:15] (current)
hermann
Line 127: Line 127:
 === dinamica.prepareTable() === === dinamica.prepareTable() ===
  
-Converts a list of lists into a table ready to be assigned to an output. The first inner list must be the header row.+Converts a list of lists into a table ready to be assigned to an output. The first inner list must be the header row. As with any table (see [[ego_script#​constants|Constants]]),​ each column'​s type is inferred from its own values: a column of ''​int''/''​float''​ values produces a Real column, a column of ''​str''​ values produces a String column.
  
 ^ Parameter ^ Type ^ Default ^ Description ^ ^ Parameter ^ Type ^ Default ^ Description ^
Line 135: Line 135:
 === dinamica.prepareLookupTable() === === dinamica.prepareLookupTable() ===
  
-Converts a list of lists into a lookup table ready to be assigned to an output. The first inner list must be the header row.+Converts a list of lists into a lookup table ready to be assigned to an output. The first inner list must be the header row. Lookup tables are always Real-typed on both key and value sides — there is no String option — so every value in ''​lut''​ must be numeric.
  
 ^ Parameter ^ Type ^ Default ^ Description ^ ^ Parameter ^ Type ^ Default ^ Description ^
Line 142: Line 142:
 === dinamica.toTable() === === dinamica.toTable() ===
  
-Converts several Python data shapes into a valid Dinamica table for output.+Converts several Python data shapes into a valid Dinamica table for output. Column types are inferred the same way as ''​dinamica.prepareTable()''​ — except for a flat list, which always produces a Real-typed lookup table with sequential keys, matching the Real-only rule for lookup tables.
  
 ^ Parameter ^ Type ^ Default ^ Description ^ ^ Parameter ^ Type ^ Default ^ Description ^
Line 277: Line 277:
  
 CalculatePythonExpression CalculatePythonExpression
- 
-