I have a csv file with 5 columns:
1, 2312, "A", , 20
2, 8383, "B", "UK",
3, 3883, , , 45
where the columns represent id, customerId, customerName, customerAddress and customerAge.
I want to put 0 at the place where the age is blank and '' where the other string type attributes are blank. But I can't identify the blank field in python. I have tried doing some things like:
len(row[4]) == 0row[4] == ''row[4] == Nonerepr(row[4]) == ''
but it didn't work. What am I doing wrong?