csv文件读取函数:csv_read()
    2021-12-13
  
描述

  csv_read() 读取csv文件函数
  csv_read() 接收一个参数,第一个参数为csv文件路径

语法

  以下是 csv_read() 的语法:   
csv_read(path)

参数

  ● path [str] csv文件路径。

返回值

  返回一个dict类型的数据

实例

  以下展示了使用 csv_read() 的实例:   
from kyger.common import csv_read
print(csv_read('test.csv'))

  以上实例运行后输出的结果为:   
{'header': ['编号', '课程', '讲师'], 'rows': [('1', 'Python', 'fighter.Lu'), ('2', 'C#', 'fighter.Lu'), ('3', '.Net', 'fighter.Lu')]}

适应版本

  v1.0.1