import csv class HandleCsv: ''' csv文件处理类 ''' def __init__(self, filename): ''' 构造器 :param filename: csv文件名 ''' self.filename = filename def get_data(self): ''' 获取csv中所有数据 :return: 嵌套字典的列表 ''' with open(self.filename, mode='r', encoding='utf-8') as f: