def rows_are_valid_csv(rows):
"""
Determine whether the rows comprise a readable simple CSV,
with a lane number, sample and index (in that order)
:type rows: list[list[string]]
:rtype: bool
"""
if not rows:
return False
if row_is_simple_header(rows[0]):
data_idx = 1
else:
data_idx = 0
pop_rows = [row for row in rows[data_idx:] if row]
tuples = [row_is_simple_data(row) for row in pop_rows]
for tup in tuples:
if tup[1]:
logging.warning(tup[1])
return all([tup[0] for tup in tuples])
评论列表
文章目录