def swap_columns(data, swapCols):
    """function to swap a set of column pairs in the data array"""
    for z in data:
        for swap in swapCols:
            z[swap[0]], z[swap[1]] = z[swap[1]], z[swap[0]]
