我有两个独立的时间数据帧。我想把广告日期付给每个人的钱加起来。以下是示例数据集:
Name Ad Date Ad Number --------------------------------- Michael 4/08/2018 1 Tony 4/08/2018 1 Alex 4/08/2018 1 Alex 6/08/2018 2 Vanessa 9/08/2018 1 Name Date Payments -------------------------------------- Michael 4/08/2018 100 Tony 4/08/2018 200 Alex 4/06/2018 300 Alex 6/06/2018 400 Alex 6/07/2018 400 Vanessa 9/08/2018 500
以下是所需的输出:
Name Ad Number Payments ------------------------------------ Michael 1 100 Tony 1 200 Alex 1 300 Alex 2 800 Vanessa 1 500
所以,如果你看看亚历克斯,一共有3笔钱是为2个广告支付的,我想用广告的日期范围来计算这些钱的总和
虽然这可能不是最强大的解决方案,但我想到了
相关问题 更多 >
编程相关推荐