iluropoda_melanoleuca bos_taurus callithrix_jacchus canis_familiaris ailuropoda_melanoleuca 0 84.6 97.4 44 bos_tau
Heres a better one i guess :
>>> a = np.arange(16).reshape(4, 4) >>> print(a) array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15]]) >>> iu = np.triu_indices(4,1) >>> il = (iu[1],iu[0]) >>> a[il]=a[iu] >>> a array([[ 0, 1, 2, 3], [ 1, 5, 6, 7], [ 2, 6, 10, 11], [ 3, 7, 11, 15]])