logic to parse to transform csv data