<h4 dir="auto">Code Sample</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
&gt;&gt;&gt; df.groupby(pd.Grouper(freq='H')).agg({'value': 'mean'})
            timestamp       delta_t
2016-06-07 00:00:00  2.729111e+11
2016-06-07 01:00:00           NaN
2016-06-07 02:00:00           NaN
2016-06-07 03:00:00           NaN
2016-06-07 04:00:00           NaN
...

&gt;&gt;&gt; df.groupby([pd.Grouper(freq='H')]).agg({'value': 'mean'})
   timestamp       delta_t
2016-06-07  2.729111e+11
2016-07-07  2.509444e+11
2016-07-13  2.775778e+11
2016-07-15  2.490556e+11
2016-07-16  2.676190e+11"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s1">pd</span>.<span class="pl-v">Grouper</span>(<span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'H'</span>)).<span class="pl-en">agg</span>({<span class="pl-s">'value'</span>: <span class="pl-s">'mean'</span>})
            <span class="pl-s1">timestamp</span>       <span class="pl-s1">delta_t</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>  <span class="pl-c1">2.729111e+11</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">01</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">02</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">03</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
...

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s1">pd</span>.<span class="pl-v">Grouper</span>(<span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'H'</span>)]).<span class="pl-en">agg</span>({<span class="pl-s">'value'</span>: <span class="pl-s">'mean'</span>})
   <span class="pl-s1">timestamp</span>       <span class="pl-s1">delta_t</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span>  <span class="pl-c1">2.729111e+11</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">07</span><span class="pl-c1">-</span><span class="pl-c1">07</span>  <span class="pl-c1">2.509444e+11</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">07</span><span class="pl-c1">-</span><span class="pl-c1">13</span>  <span class="pl-c1">2.775778e+11</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">07</span><span class="pl-c1">-</span><span class="pl-c1">15</span>  <span class="pl-c1">2.490556e+11</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">07</span><span class="pl-c1">-</span><span class="pl-c1">16</span>  <span class="pl-c1">2.676190e+11</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">This is an inconsistent behavior, and there is no mention to this on groupby or Grouper documentation.</p>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; df.groupby([pd.Grouper(freq='H')]).agg({'value': 'mean'})
   timestamp       delta_t
2016-06-07 00:00:00  2.729111e+11
2016-06-07 01:00:00           NaN
2016-06-07 02:00:00           NaN
2016-06-07 03:00:00           NaN
2016-06-07 04:00:00           NaN"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s1">pd</span>.<span class="pl-v">Grouper</span>(<span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'H'</span>)]).<span class="pl-en">agg</span>({<span class="pl-s">'value'</span>: <span class="pl-s">'mean'</span>})
   <span class="pl-s1">timestamp</span>       <span class="pl-s1">delta_t</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>  <span class="pl-c1">2.729111e+11</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">01</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">02</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">03</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span>
<span class="pl-c1">2016</span><span class="pl-c1">-</span><span class="pl-c1">06</span><span class="pl-c1">-</span><span class="pl-c1">07</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>           <span class="pl-v">NaN</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
pandas: 0.20.2
pytest: 3.1.1
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.12.1
scipy: 0.19.0
xarray: 0.9.6
IPython: 6.1.0
sphinx: 1.5.6
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: 1.2.1
tables: 3.3.0
numexpr: 2.6.2
feather: None
matplotlib: 2.0.2
openpyxl: 2.4.7
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.8.0
bs4: 4.6.0
html5lib: 0.999
sqlalchemy: 1.1.10
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
</details>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="data_frame.groupby(pd.TimeGrouper('D', convention='start', key=time_column)).count()
data_frame.groupby([pd.TimeGrouper('D', convention='start', key=time_column)]).count()"><pre class="notranslate"><span class="pl-s1">data_frame</span>.<span class="pl-en">groupby</span>(<span class="pl-s1">pd</span>.<span class="pl-v">TimeGrouper</span>(<span class="pl-s">'D'</span>, <span class="pl-s1">convention</span><span class="pl-c1">=</span><span class="pl-s">'start'</span>, <span class="pl-s1">key</span><span class="pl-c1">=</span><span class="pl-s1">time_column</span>)).<span class="pl-en">count</span>()
<span class="pl-s1">data_frame</span>.<span class="pl-en">groupby</span>([<span class="pl-s1">pd</span>.<span class="pl-v">TimeGrouper</span>(<span class="pl-s">'D'</span>, <span class="pl-s1">convention</span><span class="pl-c1">=</span><span class="pl-s">'start'</span>, <span class="pl-s1">key</span><span class="pl-c1">=</span><span class="pl-s1">time_column</span>)]).<span class="pl-en">count</span>()</pre></div>
<p dir="auto">give below two different outputs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            location  price  profit  type
time                                     
2017-07-23         1      1       1     1
2017-07-24         0      0       0     0
2017-07-25         1      1       1     1
2017-07-26         1      1       1     1
2017-07-27         3      3       3     3
2017-07-28         6      6       6     6"><pre class="notranslate"><code class="notranslate">            location  price  profit  type
time                                     
2017-07-23         1      1       1     1
2017-07-24         0      0       0     0
2017-07-25         1      1       1     1
2017-07-26         1      1       1     1
2017-07-27         3      3       3     3
2017-07-28         6      6       6     6
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            location  price  profit  type
time                                     
2017-07-23         1      1       1     1
2017-07-25         1      1       1     1
2017-07-26         1      1       1     1
2017-07-27         3      3       3     3
2017-07-28         6      6       6     6"><pre class="notranslate"><code class="notranslate">            location  price  profit  type
time                                     
2017-07-23         1      1       1     1
2017-07-25         1      1       1     1
2017-07-26         1      1       1     1
2017-07-27         3      3       3     3
2017-07-28         6      6       6     6
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The origin data frame doesn't contain a record in 2017-07-24, you can see if I use time grouper with convention='start' lonely, the 2017-07-24 item has been filled, but if by group list, that item hasn't been filled</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.10.final.0<br>
python-bits: 64<br>
OS: Darwin<br>
OS-release: 16.7.0<br>
machine: x86_64<br>
processor: i386<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.20.3<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 36.2.0<br>
Cython: None<br>
numpy: 1.13.1<br>
scipy: 0.19.1<br>
xarray: None<br>
IPython: None<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 0.9999999<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: None<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>