我不能用另一列的累计和来创建一个新列。 如果您像我一样不熟悉Python,那么Orange文档很难理解。在
这是我在Python脚本小部件中的代码
import numpy as np
## make a copy from the data that widget recieves
out_data = in_data.copy()
## compute cumulative sum of column values
newCumsumColValues = np.cumsum(out_data[:,('myCumsumcolTarget')])
## i got the values
print(newCumsumColValuesl)
## i need to create a new column with the values in out_data
## i've tried to update column values first to test
## with an static value column values updated to 8
out_data[:,'myCumsumcolTarget'] = 8
## with newCumsumColValue is NOT working
out_data[:,'myCumsumcolTarget'] = newCumsumColValues
这些例子对我来说很难理解:
https://docs.orange.biolab.si/3/visual-programming/widgets/data/pythonscript.htmlhttps://docs.orange.biolab.si/3/data-mining-library/tutorial/data.html#exploration-of-the-data-domain
提前谢谢你, 文斯。在
尝试:
其中
^{pr2}$i
是这个代码有点复杂,但它可以工作。在
相关问题 更多 >
编程相关推荐