For example, I have the following csv dataset:
[1,2,3,4]
[3,5,2,5]
[,3,2,4]
As you can see in the dataset above, there is a list with None values.
In the above situation, I want to drop the list with None values in csv.
When I tried, I could not even try to erase it because I could not read an empty value.
Please suggest a way to erase it.
here is my tried.
-before i put in xlsx data to variable named data.
while k < cols:
if data[i] != None:
with open('data.csv', 'a') as f:
writer = csv.writer(f)
writer.writerows(data)
f.close()