Open xyl576807077 opened 5 years ago
Could you show me your job?
Could you show me your job?
For example, I have a csv file like this
1 3 54
2 0 59
3 18 23
4 8 12
I want to delete those rows whose second column value is less than 7
So If i write the below code, is it correct?
def mapper(self, _, line):
line = line.split(' ')
if line[1] < 7:
yield None, None
else:
yield line[0], line[1:]
Hope your response
Hello, I want to delete some rows according to some condition. And yield None, None. It occured error