filter out records with None in any field.
This commit is contained in:
parent
2ef6e740d9
commit
2a7423a515
@ -107,7 +107,7 @@ def clean(history):
|
|||||||
Args:
|
Args:
|
||||||
history: List of records (datetime, url, title) from source database.
|
history: List of records (datetime, url, title) from source database.
|
||||||
"""
|
"""
|
||||||
nulls = [record for record in history if record[0] is None]
|
nulls = [record for record in history if None in record]
|
||||||
for null_datetime in nulls:
|
for null_datetime in nulls:
|
||||||
history.remove(null_datetime)
|
history.remove(null_datetime)
|
||||||
history = [list(record) for record in history]
|
history = [list(record) for record in history]
|
||||||
|
Loading…
Reference in New Issue
Block a user