code: def csv2dict(csv_filename, deli=',', encoding=None, key_is_header=False):
  
      
      with open(csv_filename, encoding=encoding) as csv_file:
          if key_is_header:
              reader = csv.reader(csv_file, delimiter=deli)
              # 读取字典 key
              fieldnames = next(reader)
              reader = csv.DictReader(csv_file, fieldnames=fieldnames, delimiter=deli)
              return [dict(row) for row in reader]
          reader = csv.reader(csv_file, delimiter=deli)
          return {row[0]: row[1] for row in reader if row}
docs: 将指定的 csv 文件转换为 list 返回；
  
      :param:
          * csv_filename: (string) csv 文件的长文件名
          * deli: (string) csv 文件分隔符，默认为逗号
          * del_blank_row: (string) 是否要删除空行，默认为删除
          * encode: (string) 文件编码
      :return:
          * csv_data: (dict) 读取后的数据
  
      举例如下::
  
          from fishbase.fish_file import *
          from fishbase.fish_csv import *
  
          def test_csv2dict():
              csv_filename = get_abs_filename_with_sub_path('csv', 'test_csv.csv')[1]
              print(csv_filename)
              csv_dict = csv2dict(csv_filename)
              print(csv_dict)
  
  
          if __name__ == '__main__':
              test_csv2dict()