Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
Parse Header :
Function to extract the header text for the key values of the dictionary
def parse_header(headerL):
return headerL.strip().split(',')
Parse_val
Functo to parse the values for the attributes
def parse_val(val):
values=[]
for item in val.strip().split(','):
if item == '':
values.append(0.0)
else:
values.append(float(item))
return values
Create Dictionary
Functio to convert to dictionary