Given a square pandas DataFrame of the following form:
a b c
a 1 .5 .3
b .5 1 .4
c .3 .4 1
How can the upper triangle be melted to get a matrix of the following form
Row Column Value
a a 1
a b .5
a c .3
b b 1
b c .4
c c 1
#Note the combination a,b is only listed once. There is no b,a listing
I'm more interested in an idiomatic pandas solution, a custom indexer would be easy enough to write by hand...
Thank you in advance for your consideration and response.