基于日期和客户的python中的条件计数

时间:2018-05-09 08:34:34

标签: python date count conditional invoice

我是python的新手,需要以下内容:

我有以下示例数据

Cusomer id   invoice date       stutus       count invoices paid
1                     1/1 2018             not paid        ???????
1                     12/30/ 2017      not paid         ??????
1                      12/5/2017         paid               ????????
2         ;             ..........                .........            ??????
2                       ..........               ..........           ???????
2                       ..........                ..........
4                       ..........
.
.
.

我想计算每一行,当前发票日期(发票日期)之前由同一客户支付的发票数量。

我有50000多个订单项,无法手动执行。

1 个答案:

答案 0 :(得分:0)

enter image description here

使用过的EXCEL功能:数据过滤器 enter image description here

相关问题