<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="# This works as expected, and as it worked in the past (0.17.1)
pd.concat([pd.util.testing.makeTimeSeries(), pd.Series()], axis=1)

# This fails in 0.20.1
pd.concat([pd.util.testing.makeTimeSeries().tz_localize('America/Chicago'), pd.Series()], axis=1)"><pre class="notranslate"><span class="pl-c"># This works as expected, and as it worked in the past (0.17.1)</span>
<span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">pd</span>.<span class="pl-s1">util</span>.<span class="pl-s1">testing</span>.<span class="pl-en">makeTimeSeries</span>(), <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>()], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)

<span class="pl-c"># This fails in 0.20.1</span>
<span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">pd</span>.<span class="pl-s1">util</span>.<span class="pl-s1">testing</span>.<span class="pl-en">makeTimeSeries</span>().<span class="pl-en">tz_localize</span>(<span class="pl-s">'America/Chicago'</span>), <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>()], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Only happens with <code class="notranslate">axis=1</code><br>
Shouldn't be a problem to concat an empty series to a dataframe...</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Should filter out empty objects passed to concat.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.concat([pd.Series(pd.util.testing.makeTimeSeries().tz_localize('America/Chicago'), name='with_tz'), pd.Series(name='empty')], axis=1)
Out[2]: 
                            with_tz
2000-01-03 00:00:00-06:00 -0.999300
2000-01-04 00:00:00-06:00 -0.800759
2000-01-05 00:00:00-06:00  0.166496
2000-01-06 00:00:00-06:00 -0.496464
2000-01-07 00:00:00-06:00 -0.237731
2000-01-10 00:00:00-06:00 -0.242352
2000-01-11 00:00:00-06:00  1.779163
2000-01-12 00:00:00-06:00  0.193893
"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">pd</span>.<span class="pl-s1">util</span>.<span class="pl-s1">testing</span>.<span class="pl-en">makeTimeSeries</span>().<span class="pl-en">tz_localize</span>(<span class="pl-s">'America/Chicago'</span>), <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'with_tz'</span>), <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'empty'</span>)], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">2</span>]: 
                            <span class="pl-s1">with_tz</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">03</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span> <span class="pl-c1">-</span><span class="pl-c1">0.999300</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">04</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span> <span class="pl-c1">-</span><span class="pl-c1">0.800759</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">05</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span>  <span class="pl-c1">0.166496</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">06</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span> <span class="pl-c1">-</span><span class="pl-c1">0.496464</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</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">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span> <span class="pl-c1">-</span><span class="pl-c1">0.237731</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">10</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span> <span class="pl-c1">-</span><span class="pl-c1">0.242352</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span>  <span class="pl-c1">1.779163</span>
<span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">12</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">06</span>:<span class="pl-c1">00</span>  <span class="pl-c1">0.193893</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Windows
OS-release: 8.1
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.20.2
pytest: 3.0.7
pip: 9.0.1
setuptools: 34.3.1
Cython: None
numpy: 1.12.1
scipy: 0.18.1
xarray: None
IPython: 5.3.0
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: 2.6.2
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: 1.0.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.5.1
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
</details>
<h4 dir="auto">Code Sample</h4>
<p dir="auto">I am not sure this is the simplest way to produce this error.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
import pytz
from datetime import datetime
ldn = pytz.timezone(&quot;Europe/London&quot;)
df = pd.DataFrame(data={&quot;times&quot; : [ldn.localize(datetime(2017,5,4, 11, 18)), 
                                   ldn.localize(datetime(2017,5,4,13,20)),
                                   ldn.localize(datetime(2017,3,4, 11, 18)), 
                                   ldn.localize(datetime(2017,3,4,13,20))],
                       &quot;toGroupBy&quot; : [&quot;a&quot;, &quot;a&quot;, &quot;b&quot;,&quot;b&quot;]})

def timeoffset(df):
    col = df.times
    if df.toGroupBy.iloc[0] == &quot;b&quot;:
        forward = [None for i in range(len(col))]
    else:
        forward = [None if i == len(col) -1 else col[i+1] for i in range(len(col))]
    return pd.DataFrame(data={&quot;forward&quot; : forward})

gb = df.groupby(&quot;toGroupBy&quot;)
gb.apply(timeoffset)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">import</span> <span class="pl-s1">pytz</span>
<span class="pl-k">from</span> <span class="pl-s1">datetime</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span>
<span class="pl-s1">ldn</span> <span class="pl-c1">=</span> <span class="pl-s1">pytz</span>.<span class="pl-en">timezone</span>(<span class="pl-s">"Europe/London"</span>)
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span>{<span class="pl-s">"times"</span> : [<span class="pl-s1">ldn</span>.<span class="pl-en">localize</span>(<span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">5</span>,<span class="pl-c1">4</span>, <span class="pl-c1">11</span>, <span class="pl-c1">18</span>)), 
                                   <span class="pl-s1">ldn</span>.<span class="pl-en">localize</span>(<span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">5</span>,<span class="pl-c1">4</span>,<span class="pl-c1">13</span>,<span class="pl-c1">20</span>)),
                                   <span class="pl-s1">ldn</span>.<span class="pl-en">localize</span>(<span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">3</span>,<span class="pl-c1">4</span>, <span class="pl-c1">11</span>, <span class="pl-c1">18</span>)), 
                                   <span class="pl-s1">ldn</span>.<span class="pl-en">localize</span>(<span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">3</span>,<span class="pl-c1">4</span>,<span class="pl-c1">13</span>,<span class="pl-c1">20</span>))],
                       <span class="pl-s">"toGroupBy"</span> : [<span class="pl-s">"a"</span>, <span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>,<span class="pl-s">"b"</span>]})

<span class="pl-k">def</span> <span class="pl-en">timeoffset</span>(<span class="pl-s1">df</span>):
    <span class="pl-s1">col</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-s1">times</span>
    <span class="pl-k">if</span> <span class="pl-s1">df</span>.<span class="pl-s1">toGroupBy</span>.<span class="pl-s1">iloc</span>[<span class="pl-c1">0</span>] <span class="pl-c1">==</span> <span class="pl-s">"b"</span>:
        <span class="pl-s1">forward</span> <span class="pl-c1">=</span> [<span class="pl-c1">None</span> <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">col</span>))]
    <span class="pl-k">else</span>:
        <span class="pl-s1">forward</span> <span class="pl-c1">=</span> [<span class="pl-c1">None</span> <span class="pl-k">if</span> <span class="pl-s1">i</span> <span class="pl-c1">==</span> <span class="pl-en">len</span>(<span class="pl-s1">col</span>) <span class="pl-c1">-</span><span class="pl-c1">1</span> <span class="pl-k">else</span> <span class="pl-s1">col</span>[<span class="pl-s1">i</span><span class="pl-c1">+</span><span class="pl-c1">1</span>] <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">col</span>))]
    <span class="pl-k">return</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span>{<span class="pl-s">"forward"</span> : <span class="pl-s1">forward</span>})

<span class="pl-s1">gb</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">"toGroupBy"</span>)
<span class="pl-s1">gb</span>.<span class="pl-en">apply</span>(<span class="pl-s1">timeoffset</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">the last line above throws the following stacktrace:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-59-40778c60c413&gt; in &lt;module&gt;()
----&gt; 1 gb.apply(timeoffset)

/home/me/git/pandas/pandas/core/groupby.py in apply(self, func, *args, **kwargs)
    714         # ignore SettingWithCopy here in case the user mutates
    715         with option_context('mode.chained_assignment', None):
--&gt; 716             return self._python_apply_general(f)
    717 
    718     def _python_apply_general(self, f):

/home/me/git/pandas/pandas/core/groupby.py in _python_apply_general(self, f)
    723             keys,
    724             values,
--&gt; 725             not_indexed_same=mutated or self.mutated)
    726 
    727     def _iterate_slices(self):

/home/me/git/pandas/pandas/core/groupby.py in _wrap_applied_output(self, keys, values, not_indexed_same)
   3524         elif isinstance(v, DataFrame):
   3525             return self._concat_objects(keys, values,
-&gt; 3526                                         not_indexed_same=not_indexed_same)
   3527         elif self.grouper.groupings is not None:
   3528             if len(self.grouper.groupings) &gt; 1:

/home/me/git/pandas/pandas/core/groupby.py in _concat_objects(self, keys, values, not_indexed_same)
    913 
    914                 result = concat(values, axis=self.axis, keys=group_keys,
--&gt; 915                                 levels=group_levels, names=group_names)
    916             else:
    917 

/home/me/git/pandas/pandas/core/reshape/concat.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy)
    205                        verify_integrity=verify_integrity,
    206                        copy=copy)
--&gt; 207     return op.get_result()
    208 
    209 

/home/me/git/pandas/pandas/core/reshape/concat.py in get_result(self)
    405             new_data = concatenate_block_managers(
    406                 mgrs_indexers, self.new_axes, concat_axis=self.axis,
--&gt; 407                 copy=self.copy)
    408             if not self.copy:
    409                 new_data._consolidate_inplace()

/home/me/git/pandas/pandas/core/internals.py in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy)
   4830     blocks = [make_block(
   4831         concatenate_join_units(join_units, concat_axis, copy=copy),
-&gt; 4832         placement=placement) for placement, join_units in concat_plan]
   4833 
   4834     return BlockManager(blocks, axes)

/home/me/git/pandas/pandas/core/internals.py in &lt;listcomp&gt;(.0)
   4830     blocks = [make_block(
   4831         concatenate_join_units(join_units, concat_axis, copy=copy),
-&gt; 4832         placement=placement) for placement, join_units in concat_plan]
   4833 
   4834     return BlockManager(blocks, axes)

/home/me/git/pandas/pandas/core/internals.py in concatenate_join_units(join_units, concat_axis, copy)
   4937     to_concat = [ju.get_reindexed_values(empty_dtype=empty_dtype,
   4938                                          upcasted_na=upcasted_na)
-&gt; 4939                  for ju in join_units]
   4940 
   4941     if len(to_concat) == 1:

/home/me/git/pandas/pandas/core/internals.py in &lt;listcomp&gt;(.0)
   4937     to_concat = [ju.get_reindexed_values(empty_dtype=empty_dtype,
   4938                                          upcasted_na=upcasted_na)
-&gt; 4939                  for ju in join_units]
   4940 
   4941     if len(to_concat) == 1:

/home/me/git/pandas/pandas/core/internals.py in get_reindexed_values(self, empty_dtype, upcasted_na)
   5210                     pass
   5211                 else:
-&gt; 5212                     missing_arr = np.empty(self.shape, dtype=empty_dtype)
   5213                     missing_arr.fill(fill_value)
   5214                     return missing_arr

TypeError: data type not understood"><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">TypeError</span>                                 <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">59</span><span class="pl-c1">-</span><span class="pl-c1">40778</span><span class="pl-s1">c60c413</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-s1">gb</span>.<span class="pl-en">apply</span>(<span class="pl-s1">timeoffset</span>)

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">groupby</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">apply</span>(<span class="pl-s1">self</span>, <span class="pl-s1">func</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
    <span class="pl-c1">714</span>         <span class="pl-c"># ignore SettingWithCopy here in case the user mutates</span>
    <span class="pl-c1">715</span>         <span class="pl-k">with</span> <span class="pl-en">option_context</span>(<span class="pl-s">'mode.chained_assignment'</span>, <span class="pl-c1">None</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">716</span>             <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_python_apply_general</span>(<span class="pl-s1">f</span>)
    <span class="pl-c1">717</span> 
    <span class="pl-c1">718</span>     <span class="pl-k">def</span> <span class="pl-en">_python_apply_general</span>(<span class="pl-s1">self</span>, <span class="pl-s1">f</span>):

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">groupby</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_python_apply_general</span>(<span class="pl-s1">self</span>, <span class="pl-s1">f</span>)
    <span class="pl-c1">723</span>             <span class="pl-s1">keys</span>,
    <span class="pl-c1">724</span>             <span class="pl-s1">values</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">725</span>             <span class="pl-s1">not_indexed_same</span><span class="pl-c1">=</span><span class="pl-s1">mutated</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">mutated</span>)
    <span class="pl-c1">726</span> 
    <span class="pl-c1">727</span>     <span class="pl-k">def</span> <span class="pl-en">_iterate_slices</span>(<span class="pl-s1">self</span>):

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">groupby</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_wrap_applied_output</span>(<span class="pl-s1">self</span>, <span class="pl-s1">keys</span>, <span class="pl-s1">values</span>, <span class="pl-s1">not_indexed_same</span>)
   <span class="pl-c1">3524</span>         <span class="pl-s1">elif</span> <span class="pl-s1">isinstance</span>(<span class="pl-s1">v</span>, <span class="pl-v">DataFrame</span>):
   <span class="pl-c1">3525</span>             <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_concat_objects</span>(<span class="pl-s1">keys</span>, <span class="pl-s1">values</span>,
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3526</span>                                         <span class="pl-s1">not_indexed_same</span><span class="pl-c1">=</span><span class="pl-s1">not_indexed_same</span>)
   <span class="pl-c1">3527</span>         <span class="pl-s1">elif</span> <span class="pl-s1">self</span>.<span class="pl-s1">grouper</span>.<span class="pl-s1">groupings</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>:
   <span class="pl-c1">3528</span>             <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">self</span>.<span class="pl-s1">grouper</span>.<span class="pl-s1">groupings</span>) <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span>:

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">groupby</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_concat_objects</span>(<span class="pl-s1">self</span>, <span class="pl-s1">keys</span>, <span class="pl-s1">values</span>, <span class="pl-s1">not_indexed_same</span>)
    <span class="pl-c1">913</span> 
    <span class="pl-c1">914</span>                 <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-en">concat</span>(<span class="pl-s1">values</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">axis</span>, <span class="pl-s1">keys</span><span class="pl-c1">=</span><span class="pl-s1">group_keys</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">915</span>                                 <span class="pl-s1">levels</span><span class="pl-c1">=</span><span class="pl-s1">group_levels</span>, <span class="pl-s1">names</span><span class="pl-c1">=</span><span class="pl-s1">group_names</span>)
    <span class="pl-c1">916</span>             <span class="pl-k">else</span>:
    <span class="pl-c1">917</span> 

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">reshape</span><span class="pl-c1">/</span><span class="pl-s1">concat</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">concat</span>(<span class="pl-s1">objs</span>, <span class="pl-s1">axis</span>, <span class="pl-s1">join</span>, <span class="pl-s1">join_axes</span>, <span class="pl-s1">ignore_index</span>, <span class="pl-s1">keys</span>, <span class="pl-s1">levels</span>, <span class="pl-s1">names</span>, <span class="pl-s1">verify_integrity</span>, <span class="pl-s1">copy</span>)
    <span class="pl-c1">205</span>                        <span class="pl-s1">verify_integrity</span><span class="pl-c1">=</span><span class="pl-s1">verify_integrity</span>,
    <span class="pl-c1">206</span>                        <span class="pl-s1">copy</span><span class="pl-c1">=</span><span class="pl-s1">copy</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">207</span>     <span class="pl-s1">return</span> <span class="pl-s1">op</span>.<span class="pl-en">get_result</span>()
    <span class="pl-c1">208</span> 
    <span class="pl-c1">209</span> 

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">reshape</span><span class="pl-c1">/</span><span class="pl-s1">concat</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">get_result</span>(<span class="pl-s1">self</span>)
    <span class="pl-c1">405</span>             <span class="pl-s1">new_data</span> <span class="pl-c1">=</span> <span class="pl-en">concatenate_block_managers</span>(
    <span class="pl-c1">406</span>                 <span class="pl-s1">mgrs_indexers</span>, <span class="pl-s1">self</span>.<span class="pl-s1">new_axes</span>, <span class="pl-s1">concat_axis</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">axis</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">407</span>                 <span class="pl-s1">copy</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">copy</span>)
    <span class="pl-c1">408</span>             <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">self</span>.<span class="pl-s1">copy</span>:
    <span class="pl-c1">409</span>                 <span class="pl-s1">new_data</span>.<span class="pl-en">_consolidate_inplace</span>()

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">concatenate_block_managers</span>(<span class="pl-s1">mgrs_indexers</span>, <span class="pl-s1">axes</span>, <span class="pl-s1">concat_axis</span>, <span class="pl-s1">copy</span>)
   <span class="pl-c1">4830</span>     <span class="pl-s1">blocks</span> <span class="pl-c1">=</span> [<span class="pl-en">make_block</span>(
   <span class="pl-c1">4831</span>         <span class="pl-en">concatenate_join_units</span>(<span class="pl-s1">join_units</span>, <span class="pl-s1">concat_axis</span>, <span class="pl-s1">copy</span><span class="pl-c1">=</span><span class="pl-s1">copy</span>),
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">4832</span>         <span class="pl-s1">placement</span><span class="pl-c1">=</span><span class="pl-s1">placement</span>) <span class="pl-s1">for</span> <span class="pl-s1">placement</span>, <span class="pl-s1">join_units</span> <span class="pl-c1">in</span> <span class="pl-s1">concat_plan</span>]
   <span class="pl-c1">4833</span> 
   <span class="pl-c1">4834</span>     <span class="pl-k">return</span> <span class="pl-v">BlockManager</span>(<span class="pl-s1">blocks</span>, <span class="pl-s1">axes</span>)

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">listcomp</span><span class="pl-c1">&gt;</span>(<span class="pl-c1">.0</span>)
   <span class="pl-c1">4830</span>     <span class="pl-s1">blocks</span> <span class="pl-c1">=</span> [<span class="pl-en">make_block</span>(
   <span class="pl-c1">4831</span>         <span class="pl-en">concatenate_join_units</span>(<span class="pl-s1">join_units</span>, <span class="pl-s1">concat_axis</span>, <span class="pl-s1">copy</span><span class="pl-c1">=</span><span class="pl-s1">copy</span>),
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">4832</span>         <span class="pl-s1">placement</span><span class="pl-c1">=</span><span class="pl-s1">placement</span>) <span class="pl-s1">for</span> <span class="pl-s1">placement</span>, <span class="pl-s1">join_units</span> <span class="pl-c1">in</span> <span class="pl-s1">concat_plan</span>]
   <span class="pl-c1">4833</span> 
   <span class="pl-c1">4834</span>     <span class="pl-k">return</span> <span class="pl-v">BlockManager</span>(<span class="pl-s1">blocks</span>, <span class="pl-s1">axes</span>)

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">concatenate_join_units</span>(<span class="pl-s1">join_units</span>, <span class="pl-s1">concat_axis</span>, <span class="pl-s1">copy</span>)
   <span class="pl-c1">4937</span>     <span class="pl-s1">to_concat</span> <span class="pl-c1">=</span> [<span class="pl-s1">ju</span>.<span class="pl-en">get_reindexed_values</span>(<span class="pl-s1">empty_dtype</span><span class="pl-c1">=</span><span class="pl-s1">empty_dtype</span>,
   <span class="pl-c1">4938</span>                                          <span class="pl-s1">upcasted_na</span><span class="pl-c1">=</span><span class="pl-s1">upcasted_na</span>)
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">4939</span>                  <span class="pl-s1">for</span> <span class="pl-s1">ju</span> <span class="pl-c1">in</span> <span class="pl-s1">join_units</span>]
   <span class="pl-c1">4940</span> 
   <span class="pl-c1">4941</span>     <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">to_concat</span>) <span class="pl-c1">==</span> <span class="pl-c1">1</span>:

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">listcomp</span><span class="pl-c1">&gt;</span>(<span class="pl-c1">.0</span>)
   <span class="pl-c1">4937</span>     <span class="pl-s1">to_concat</span> <span class="pl-c1">=</span> [<span class="pl-s1">ju</span>.<span class="pl-en">get_reindexed_values</span>(<span class="pl-s1">empty_dtype</span><span class="pl-c1">=</span><span class="pl-s1">empty_dtype</span>,
   <span class="pl-c1">4938</span>                                          <span class="pl-s1">upcasted_na</span><span class="pl-c1">=</span><span class="pl-s1">upcasted_na</span>)
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">4939</span>                  <span class="pl-s1">for</span> <span class="pl-s1">ju</span> <span class="pl-c1">in</span> <span class="pl-s1">join_units</span>]
   <span class="pl-c1">4940</span> 
   <span class="pl-c1">4941</span>     <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">to_concat</span>) <span class="pl-c1">==</span> <span class="pl-c1">1</span>:

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">git</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">get_reindexed_values</span>(<span class="pl-s1">self</span>, <span class="pl-s1">empty_dtype</span>, <span class="pl-s1">upcasted_na</span>)
   <span class="pl-c1">5210</span>                     <span class="pl-k">pass</span>
   <span class="pl-c1">5211</span>                 <span class="pl-k">else</span>:
<span class="pl-c1">-&gt;</span> <span class="pl-c1">5212</span>                     <span class="pl-s1">missing_arr</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">empty</span>(<span class="pl-s1">self</span>.<span class="pl-s1">shape</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">empty_dtype</span>)
   <span class="pl-c1">5213</span>                     <span class="pl-s1">missing_arr</span>.<span class="pl-en">fill</span>(<span class="pl-s1">fill_value</span>)
   <span class="pl-c1">5214</span>                     <span class="pl-k">return</span> <span class="pl-s1">missing_arr</span>

<span class="pl-v">TypeError</span>: <span class="pl-s1">data</span> <span class="pl-s1">type</span> <span class="pl-c1">not</span> <span class="pl-s1">understood</span></pre></div>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="                              forward
toGroupBy                            
a         0 2017-05-04 13:20:00+01:00
          1                       NaT
b         0                       NaT
          1                       NaT"><pre class="notranslate">                              <span class="pl-s1">forward</span>
<span class="pl-s1">toGroupBy</span>                            
<span class="pl-s1">a</span>         <span class="pl-c1">0</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">05</span><span class="pl-c1">-</span><span class="pl-c1">04</span> <span class="pl-c1">13</span>:<span class="pl-c1">20</span>:<span class="pl-c1">00</span><span class="pl-c1">+</span><span class="pl-c1">01</span>:<span class="pl-c1">00</span>
          <span class="pl-c1">1</span>                       <span class="pl-v">NaT</span>
<span class="pl-s1">b</span>         <span class="pl-c1">0</span>                       <span class="pl-v">NaT</span>
          <span class="pl-c1">1</span>                       <span class="pl-v">NaT</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.0.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.32-696.el6.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: en_GB.utf8
LANG: en_GB.utf8
LOCALE: en_GB.UTF-8
<p dir="auto">pandas: 0.20.0rc1+48.gae70ece<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 28.8.0<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: None<br>
xarray: None<br>
IPython: 6.0.0<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.6.0<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.999999999<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>