简体   繁体   English

如何使用IronPython脚本(最好使用外部名称)在Spotfire中创建计算列?

[英]How can I create a Calculated Column in Spotfire with IronPython script (preferably using External Name)?

I have a data table where I can not count on the column names being the same from moment to moment so I cannot build Calculated Columns the standard way because it uses the "Column Name" property (and that can change). 我有一个数据表,在其中我不能指望时时刻刻都相同的列名,因此我无法以标准方式构建计算列,因为它使用了“列名”属性(并且可以更改)。

So, I'd like to build them via IronPython using the External Name which won't change without notice. 因此,我想通过IronPython使用外部名称来构建它们,而外部名称不会更改,恕不另行通知。

由于您已经知道如何通过外部名称访问特定列 ,因此可以使用该方法来更改列的Expression属性,如下所示:

column.Properties["Expression"] = "If([some_column] = 1, 'YES', 'NO')"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM