title: Pandas, group by resample and fill missing values with zero
body: <p>I have the following code</p>
  
  <pre><code>import pandas as pd
  
  data = {'date': ['2014-05-01', '2014-05-02', '2014-05-04', '2014-05-01', '2014-05-03', '2014-05-04'],
          'battle_deaths': [34, 25, 26, 15, 15, 14],
          'group': [1, 1, 1, 2, 2, 2]}
  
  df = pd.DataFrame(data, columns=['date', 'battle_deaths', 'group'])
  
  df['date'] = pd.to_datetime(df['date'])
  df = df.set_index('date')
  df = df.sort_index()
  </code></pre>
  
  <p>I want to have a battle deaths count per group without any gaps in the dates. Something like</p>
  
  <pre><code>            battle_deaths  group
  date                            
  2014-05-01             34      1
  2014-05-01             15      2
  2014-05-02             25      1
  2014-05-02              0      2 &lt;--added with battle_deaths = 0 to fill the date range
  2014-05-03              0      1 &lt;--added
  2014-05-03             15      2
  2014-05-04             26      1
  2014-05-04             14      2
  </code></pre>
  
  <p>I have tried the following but it doesn't work(because the fillna method does not take a number, but adding it here to show what I want to achieve)</p>
  
  <pre><code>df.groupby(df.group.name).resample('D').fillna(0)
  </code></pre>
  
  <p>How can I do this with pandas?</p>