python - QtiPlot中的条件语句
我尝试使用条件表达式填充列中的某些值" if":
if(col("6")-0.02)<0; 0; col("6")-0.02)
提示&#34;如果&#34; QtiPlot中的函数:
if(e1; e2; e3): if e1 then e2 else e3.
QtiPlot返回错误:
意外的令牌&#34;如果&#34;在0号位找到。
最佳答案:
1 个答案:
答案 0 :(得分:1)
if-statement
从muParser
中移除,有利于三元运算符,就像在C / C 中一样。因此if(e1, e2, e3)
替换为(e1) ? e2:e3
。
本文经用户投稿或网站收集转载,如有侵权请联系本站。