title: How to fill the missing multiple columns and rows for pivot table in Python?
body: <p>Is there any method or function to fill missing multiple columns and rows for pivot table in python?</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from io import StringIO
  
  csvfile = StringIO("""Date;Cat;Type;Value
  01-Jan;AA;S;1
  02-Jan;AA;F;2
  02-Jan;BB;T;3
  04-Jan;BB;T;3
  05-Jan;CC;T;2
  05-Jan;DD;T;1
  05-Jan;BB;S;4
  05-Jan;AA;S;2
  05-Jan;DD;S;4""")
  
  df = pd.read_csv(csvfile, sep = ';')
  pt = pd.pivot_table(df, values = 'Value', index=['Cat', 'Type'], columns= ['Date'], aggfunc = np.sum, fill_value = 0)
  pt
  </code></pre>
  
  <p>The above code result shows as below, the Type columns are missing values (F,S,T) for some Cat, 03-Jan column is missing:</p>
  
  <pre><code>Cat|Type|01-Jan|02-Jan|04-Jan|05-Jan|
  ---+----+------+------+------+------+
  AA |F   |      |     2|      |      |
     |S   |     1|      |      |     2|
  BB |S   |      |      |      |     4|
     |T   |      |     3|     3|      |
  CC |T   |      |      |      |     2|
  DD |S   |      |      |      |     4|
     |T   |      |      |      |     1|
  </code></pre>
  
  <p>But the expected result want as:</p>
  
  <pre><code>Cat|Type|01-Jan|02-Jan|03-Jan|04-Jan|05-Jan|
  ---+----+------+------+------+------+------+
  AA |F   |      |     2|      |      |      |
     |S   |     1|      |      |      |     2|
     |T   |      |      |      |      |      |
  BB |F   |      |      |      |      |      |
     |S   |      |      |      |      |     4|
     |T   |      |     3|      |     3|      |
  CC |F   |      |      |      |      |      |
     |S   |      |      |      |      |      |
     |T   |      |      |      |      |     2|
  DD |F   |      |      |      |      |      |
     |S   |      |      |      |      |     4|
     |T   |      |      |      |      |     1|
  </code></pre>