I want to concatenate a string from a 2d numpy array like this,
for x in np.ndindex(mat.shape[0]):
concat = ""
for y in range(len(columns)):
concat += str(mat[x][2 + y])
where mat is a 2d array containing strings or ints in each cell, columns is a list of column names for mat, e.g. ['A', 'B', 'C', 'D'], using mat[x][2 + y] to avoid concatenating strings from the 1st two columns. I am wondering what is the best way to do it, probably in a more concise/efficient way.