Merge sublists of nested list if first index element match
The more basic way is to make two nested loops, write a condition if the first index match, move them to a new list.
You can try to convert them to numpy array which will make them a 2d array then you can compare easier
list = [['100', '88', '', ''], ['100', '', '68', ''], ['100', '', '', '58'],['102', '28', '', ''], ['102', '', '2', ''], ['104', '11', '', ''], ['104', '', '2', ''], ['110', '2', '', ''], ['202', '', '14', ''], ['202', '37429', '', '']]
need to merge the sub list on first index value.
output = [['100', 88, '68', '58'], ['102', 28, '2', ''],['104', 11, '2', ''],['110', 2, '', ''],['202', '37429', 14, '']]