我有CSV文件,其中一些链接存储在其中一列中。我只想阅读链接并打印出来。我尝试使用以下代码,但输出为none。
import csv
filename ='abc.csv'
with open(filename,'rb') as f:
reader = csv.reader(f)
for row in reader:
for item in row:
if item.startswith('http'):
print(item)
答案 0 :(得分:0)
=ARRAYFORMULA({SPLIT(TRANSPOSE(SPLIT(TRIM(QUERY("♠"&SORT(UNIQUE(FILTER(A2:A, A2:A<>"")))&
TRANSPOSE(QUERY(TRANSPOSE(IF(LEN(QUERY(TRANSPOSE(QUERY(QUERY(A2:C,
"select B,sum(C) where B<>'' group by B pivot A", 0), "offset 1", 0)), "offset 1", 0)),
"♠ ♦"&TRANSPOSE(SORT(UNIQUE(FILTER(B2:B, B2:B<>""))))&"♦"&QUERY(TRANSPOSE(QUERY(QUERY(A2:C,
"select B,sum(C) where B<>'' group by B pivot A", 0), "offset 1", 0)), "offset 1", 0), ))
, , 999^99))&"♠ ♦Total:♦"&MMULT(QUERY(TRANSPOSE(QUERY(QUERY(A2:C,
"select B,sum(C) where B<>'' group by B pivot A", 0), "offset 1", 0)), "offset 1", 0)*1,
TRANSPOSE(SPLIT(REPT(COUNTUNIQUE(B2:B)&"♦", COUNTUNIQUE(B2:B)), "♦")^0)), , 999^99)),
"♠")), "♦"); "", "Total:", SUM(C2:C)})