Commit 02341e22 by BellCodeEditor

auto save

parent 3faf4b37
Showing with 11 additions and 2 deletions
"""读取csv文件""""
\ No newline at end of file
# """读取csv文件""""
import csv
with open('report.csv',"r", encoding="utf-8")as f:
f_csv = csv.reader(f) # 读取csv文件内容
f_csv = list(f_csv) # 转换为列表
pipi = f_csv[7] # 通过索引获取列表信息并赋值给变量pipi
print(pipi) # 打印出结果
for row in f_csv: # for循环
print(row[3]) # 打印出结果ss
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment