📌  相关文章
📜  import csv import re data = [] with open('customerData.csv') as csvfile: reader = csv.DictReader(csvfile) for row in reader: data.append(row) print(data[0]) print(data[ 1]["Name"]) print(data[2]["Spent Past 30 Days"]) - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:54.366000             🧑  作者: Mango

代码示例1
import csv
import re
data = []

with open('customerData.csv') as csvfile:
    reader = csv.DictReader(csvfile)
    for row in reader:
        data.append(row)
print(data[0])
print(data[1]["Name"])
print(data[2]["Spent Past 30 Days"])