Package tlib :: Package base :: Module CsvHelper
[hide private]
[frames] | no frames]

Module CsvHelper

source code

Functions [hide private]
 
csv2dict(input_file)
Convert csv data to dictionary, the result will be stored in data attribute
source code
Variables [hide private]
  __package__ = 'tlib.base'
Function Details [hide private]

csv2dict(input_file)

source code 

Convert csv data to dictionary, the result will be stored in data attribute

Parameters:
  • input_file (str | StringIO) - path to the excel file or a StringIO object
Returns:
list[dict]
Raises:
  • FileNotExistError - File does not exist
  • TypeError - File parameter is not of type str or StringIO