def swap_entry(data, p):
    for i in range(len(data)):
        for j in range(1, len(data[i])):
            if (np.random.random_sample() < p):
                data[i][j] = data[i][(j - 1)]
                data[i][(j - 1)] = data[i][j]
    return data
def swap_entry(data, p):
    for i in range(len(data)):
        for j in range(1, len(data[i])):
            if (np.random.random_sample() < p):
                data[i][j] = data[i][(j - 1)]
                data[i][(j - 1)] = data[i][j]
    return data