A minor comment, maybe instead of checking the length of the row every time, we can just handle the exception in case the column is not present in the row.