序号,提现金额,处理状态,提现时间,支付时间
1,23.530,已支付,2020-12-27,17:48:58,2020-12-29 13:23:21
2,11.330,已支付,2020-09-13 20:37:55,2020-09-14 13:44:00
3,10.010,已支付,2020-07-19 18:23:28,2020-07-20 13:29:44
4,10.000,已支付,2020-05-31 20:54:46,2020-06-01 13:48:52
5,12.180,已支付,2020-03-29 20:28:20,2020-03-30 15:08:58
6,11.550,已支付,2019-12-29 19:25:39,2019-12-30 13:21:35
7,10.870,已支付,2019-09-15 21:39:03,2019-09-16 12:51:36
8,10.350,已支付,2019-02-09 07:20:59,2019-02-11 10:56:55
9,10.010,已支付,2018-06-30 10:24:07,2018-07-02 12:32:31
10,10.620,已支付,2016-09-24 07:21:55,2016-09-26 11:45:12
统计总收入和每一年的收入情况,代码应该如何写呢?
------
计算总收入的代码我是这样写的- import csv
- import numpy as np
- with open('incoming.csv') as csv_file:
- row = csv.reader(csv_file,delimiter=',')
- next(row)
- income = []
- for r in row:
- # print(r[1])
- income.append(float(r[1]))
- print(np.sum(income))
复制代码
|