import csv #德明科大劉任昌修改11與16列
f = open('00960.csv','r',encoding='utf-8')
csv_reader = csv.reader(f)
header, rows = [], [] #宣告空白串列(陣列,清單)
header = next(csv_reader) #串列header存放第一列標題
for row in csv_reader: #逐列讀檔案、附加append於rows串列
rows.append(row)
f.close()
idSet = set()
component = dict()
#zeros = [0 for i in range(21)]
for row in rows:
for j in range(0, 21):
idSet.add(row[j*4])
for id in idSet:
component[id] = [0 for i in range(21)] #取代原來的zeros
for row in rows:
for j in range(0, 21):
if row[j*4+3] != '':
component[row[j*4]][j] = row[j*4 + 3]
print(row[j*4+1],component[row[j*4]])
for id in idSet:
print(id, component[id])
https://hsiao-yu0711.blogspot.com/2026/06/blog-post_25.html
回覆刪除https://fanyahui.blogspot.com/2026/06/blog-post_25.html
回覆刪除https://s10655075.blogspot.com/2026/06/blog-post.html
回覆刪除https://stanley-ouo.blogspot.com/2026/06/blog-post.html
回覆刪除https://lukelu0928.blogspot.com/2026/06/blog-post.html
回覆刪除https://yiminglinn.blogspot.com/2026/06/blog-post.html
回覆刪除很有效率ttps://yiminglinn.blogspot.com/2026/06/blog-post.html
刪除522野村https://yiminglinn.blogspot.com/2026/05/00960.html
很有效率ttps://yiminglinn.blogspot.com/2026/06/blog-post.html
刪除522野村https://yiminglinn.blogspot.com/2026/05/00960.html
這個亂搞被導致不能留言這個亂拷貝導致不能留言https://yiminglinn.blogspot.com/2026/04/blog-post_23.html
https://11217133d.blogspot.com/2026/06/blog-post.html?m=1
回覆刪除你是民族的救星,你是世界的偉人。
刪除https://xuan0729.blogspot.com/2026/06/blog-post.html
回覆刪除https://the-most-great.blogspot.com/2026/06/blog-post.html
回覆刪除https://the-most-great-tony11.blogspot.com/2026/06/blog-post.html
回覆刪除https://laiweikaiaaa.blogspot.com/2026/06/blog-post.html
回覆刪除https://hank20050328.blogspot.com/2026/06/blog-post.html
回覆刪除https://yunn-xin.blogspot.com/2026/06/blog-post.html
回覆刪除https://chenyouhong.blogspot.com/2026/06/blog-post.html
回覆刪除https://tsaiziytang.blogspot.com/2026/07/blog-post.html
回覆刪除https://liucaiwu.blogspot.com/2026/07/import-csv-1116-f-open00960.htm
回覆刪除https://giinasmile.blogspot.com/2026/07/blog-post.html
回覆刪除https://draft.blogger.com/blog/post/edit/preview/1413291454110337811/5418144711097195372
回覆刪除https://michelle814.blogspot.com/2026/07/blog-post.html
回覆刪除https://chen0119.blogspot.com/2026/07/blog-post.html
回覆刪除https://shenzhenxuan.blogspot.com/2026/07/blog-post.html
回覆刪除https://kungyuting.blogspot.com/2026/07/blog-post.html
回覆刪除https://honghikun.blogspot.com/2026/07/blog-post.html
回覆刪除https://li1007.blogspot.com/2026/07/blog-post.html
回覆刪除https://d11217119.blogspot.com/2026/07/blog-post.html
回覆刪除https://su-you-an.blogspot.com/2026/07/import-csv-1116-f-open00960.html
回覆刪除https://www.blogger.com/blog/post/edit/preview/7981990836789718013/4218357398466207263
回覆刪除https://liu-guang-wei.blogspot.com/2026/07/import-csv-1116-f-open00960.html
回覆刪除https://the-most-little-black.blogspot.com/2026/07/blog-post.html
回覆刪除https://xi-xbox-mmi.blogspot.com/2026/07/import-csv-1116-f-open00960.html
回覆刪除https://56788888.blogspot.com/2026/07/blog-post.html
回覆刪除作者已經移除這則留言。
回覆刪除https://linxinzhuo.blogspot.com/2026/07/blog-post.html
回覆刪除