【问题标题】:new column is the sum of two consecutive rows新列是两个连续行的总和
【发布时间】:2021-10-26 22:37:39
【问题描述】:

请你的外邦人帮助,任何人都可以帮助我处理 pandas-python

我需要一个新列,这个新列是连续两行的总和,(图) enter image description here

【问题讨论】:

标签: pandas sum cumsum


【解决方案1】:

您可以查看table.assign(<new column> = <formula>) 函数来构建您的数据框。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多