Convert Date Ranges to Time Series in Pandas
<p>My raw data looks like the following:</p>

<pre><code>  start_date   end_date  value
0 2016-01-01 2016-01-03      2
1 2016-01-05 2016-01-08      4
</code></pre>

<p>The interpretation is that the data takes a value of <strong>2</strong> between <strong>1/1/2016</strong> and <strong>1/3/2016</strong>, and it takes a value of <strong>4</strong> between <strong>1/5/2016</strong> and <strong>1/8/2016</strong>.  I want to transform the raw data to a daily time series like the following:</p>

<pre><code>2016-01-01    2
2016-01-02    2
2016-01-03    2
2016-01-04    0
2016-01-05    4
2016-01-06    4
2016-01-07    4
2016-01-08    4
</code></pre>

<p>Note that if a date in the time series doesn't appear between the <strong>start_date</strong> and <strong>end_date</strong> in any row of the raw data, it gets a value of 0 in the time series.</p>

<p>I can create the time series by looping through the raw data, but that's slow.  Is there a faster way to do it?</p>