title: Transform Matrix - Showing all the 0 value
body: <p>I have a huge dataframe. The data looks like this:</p>
  
  <pre><code>Person  Distance    BS
  A       125.58      BS3
  A       212.01      BS4
  B       11.41       BS3
  B       134.35      BS2
  C       11.41       BS3
  C       274.20      BS2
  D       220.98      BS5
  D       8.01        BS7
  E       606.05      BS1
  E       676.88      BS2
  F       28.81       BS7
  F       98.69       BS5
  G       81.64       BS1
  G       35.49       BS3
  </code></pre>
  
  <p>I transform this dataset into OD matrix based on this question <a href="https://stackoverflow.com/questions/56520616/is-it-possible-from-dataframe-transform-to-matrix">Is it possible from dataframe transform to Matrix?</a> with this code:</p>
  
  <pre><code>df = pd.read_csv("data.csv")
  df = df[df.Distance &lt; 100]
  df = df[df.groupby('Person').Person.transform(len) &gt; 1]
  places = df["BS"].unique()
  places.sort()
  od_df = pd.DataFrame(df["BS"].values.reshape((-1, 2)), columns=["O", "D"])
  od_matrix = pd.pivot_table(od_df, index="O", columns="D", aggfunc="size").reindex(index=places, columns=places)
  od_matrix.fillna(0, downcast="infer", inplace=True)
  od_matrix
  </code></pre>
  
  <p>I want to eliminate the distance above 100 meters. Therefore, I put <code>distance &lt; 100</code>. The result looks like this:</p>
  
  <pre><code>D   BS1 BS3 BS5 BS7
  O               
  BS1 0   1   0   0
  BS3 0   0   0   0
  BS5 0   0   0   0
  BS7 0   0   1   0
  </code></pre>
  
  <p>if my huge data is from BS1 to BS9, after elimination the matrix column and row no data (0) will dissapear too. How to show the all columns and rows event if no data (0)?. I want to show the matrix looks like this:</p>
  
  <pre><code>D   BS1 BS2 BS3 BS4 BS5 BS6 BS7 BS8 BS9
  O                                   
  BS1 0   0   1   0   0   0   0   0   0
  BS2 0   0   0   0   0   0   0   0   0
  BS3 0   0   0   0   0   0   0   0   0
  BS4 0   0   0   0   0   0   0   0   0
  BS5 0   0   0   0   0   0   0   0   0
  BS6 0   0   0   0   0   0   0   0   0
  BS7 0   0   0   0   1   0   0   0   0
  BS8 0   0   0   0   0   0   0   0   0
  BS9 0   0   0   0   0   0   0   0   0
  </code></pre>