【发布时间】:2021-02-12 17:20:59
【问题描述】:
我想根据另一列和当前行之前的行的函数生成一个新列。
即
NewColumn_{n} = OldColumn_{n} * 0.6 + NewColumn_{n-1} * 0.4
我是否可以不使用iterrows 来做到这一点?
我看到了这个帖子:How to constuct a column of data frame recursively with pandas-python?
但我想知道 Pandas 中是否还有其他功能/包或技巧?
R 中的 purrr 之类的东西?
【问题讨论】:
标签: python-3.x pandas dataframe recursion