(response, template)
return response_rows
Take in a list of responses and covert them to SSE.Rows based on the column type specified in template
    The template should be a list of the form: ["str", "num", "dual", ...]
    For string values use: "str"
    For numeric values use: "num"
    For dual values: "dual"
Take in a list of responses and covert them to SSE.Rows based on the column type specified in template
    The template should be a list of the form: ["str", "num", "dual", ...]
    For string values use: "str"
    For numeric values use: "num"
    For dual values: "dual"
Take in a list of responses and covert them to SSE . Rows based on the column type specified in template The template should be a list of the form : [ str num dual ... ] For string values use : str For numeric values use : num For dual values : dual
def get_response_rows(response, template):
    """
    Take in a list of responses and covert them to SSE.Rows based on the column type specified in template
    The template should be a list of the form: ["str", "num", "dual", ...]
    For string values use: "str"
    For numeric values use: "num"
    For dual values: "dual"
    """

    response_rows = []
    
    # For each row in the response list
    for row in response:
        i = 0
        this_row = []
        
        if len(template) > 1:        
            # For each column in the row
            for col in row:
                # Convert values to type SSE.Dual according to the template list
                if template[i] == "str":
                    if col is None:
                        col = "\x00"
                    elif type(col) is not str:
                        col = "{0:.5f}".format(col)
                    this_row.append(SSE.Dual(strData=col))
                elif template[i] == "num":
                    this_row.append(SSE.Dual(numData=col))
                elif template[i] == "dual":
                    this_row.append(SSE.Dual(strData=col, numData=col))
                i = i + 1
        else:
            # Convert values to type SSE.Dual according to the template list
            if template[0] == "str":
                if row is None:
                    row = "\x00"
                elif type(row) is not str:
                    row = "{0:.5f}".format(row)
                this_row.append(SSE.Dual(strData=row))
            elif template[0] == "num":
                this_row.append(SSE.Dual(numData=row))
            elif template[0] == "dual":
                this_row.append(SSE.Dual(strData=row, numData=row))
        
        # Group columns into a iterable and add to the the response_rows
        response_rows.append(iter(this_row))

    # Values are then structured as SSE.Rows
    response_rows = [SSE.Row(duals=duals) for duals in response_rows]

    return response_rows
def get_response_rows ( response , template ) : response_rows = [ ] # For each row in the response list for row in response : i = 0 this_row = [ ] if len ( template ) > 1 : # For each column in the row for col in row : # Convert values to type SSE.Dual according to the template list if template [ i ] == "str" : if col is None : col = "\x00" elif type ( col ) is not str : col = "{0:.5f}" . format ( col ) this_row . append ( SSE . Dual ( strData = col ) ) elif template [ i ] == "num" : this_row . append ( SSE . Dual ( numData = col ) ) elif template [ i ] == "dual" : this_row . append ( SSE . Dual ( strData = col , numData = col ) ) i = i + 1 else : # Convert values to type SSE.Dual according to the template list if template [ 0 ] == "str" : if row is None : row = "\x00" elif type ( row ) is not str : row = "{0:.5f}" . format ( row ) this_row . append ( SSE . Dual ( strData = row ) ) elif template [ 0 ] == "num" : this_row . append ( SSE . Dual ( numData = row ) ) elif template [ 0 ] == "dual" : this_row . append ( SSE . Dual ( strData = row , numData = row ) ) # Group columns into a iterable and add to the the response_rows response_rows . append ( iter ( this_row ) ) # Values are then structured as SSE.Rows response_rows = [ SSE . Row ( duals = duals ) for duals in response_rows ] return response_rows