Commit 50c9e3aa by BellCodeEditor

save project

parent 3faf4b37
Showing with 21 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)
f_csv = list(f_csv)
#print(f_csv)
gs = len(f_csv)
for i in range(gs):
if f_csv[i][0] == "皮皮":
print(f_csv[i])
ls = len(f_csv[0])
k = 0
for j in range(ls):
if f_csv[0][j] == "英语":
k = j
break
for i in range(1, gs):
print(f_csv[i][k], end=" ")
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