I have a pandas series as so:

```
A   1
B   2
C   3
AB  4
AC  5
BA  4
BC  8
CA  5
CB  8

```

Simple code to convert to a matrix as such:

```
1 4 5
4 2 8
5 8 3

```

Something fairly dynamic and built in, rather than many loops to fix this 3x3 problem.