CSV Reader出現問題
2020/03/04 11:08 下午
Python網路爬蟲討論版
陳郁昇
觀看數:7
回答數:1
收藏數:0
pycrawler-2
為何我執行以下sample code會產生錯誤?
import csv
# 開啟 CSV 檔案
with open('./data/example.csv', newline='') as csvfile:
# 讀取 CSV 檔案內容
rows = csv.reader(csvfile)
# 以迴圈輸出每一列
for row in rows:
print(row)