I have the following csv file:
NAME DETAILS
abc type1: Y, Property: p1,p3 , type2:N
def type1: Y, Property: p2,p3 , type2:N
ghi type1: N, Property: p1,p2 , type2:Y
jkl type1: N, Property: p1,p3 , type2:Y
I want to have the ouput file as:
NAME type1 Property type2
abc Y p1,p3 N
def Y p2,p3 N
ghi N p1,p2 Y
jkl N p1,p3 Y
Using python and regular expressions, If I split Details column based on ',' the property type splits into separate columns. Is there a way I could deal with this situation?
csvmodule not be useful here? docs are here