<p dir="auto">This showed up in the dask.dataframe test suite when testing against the 0.19 release candidate.  I'm unsure if this was an intended change or not:</p>
<h3 dir="auto">Pandas 0.18</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import pandas as pd

In [2]: a = pd.Series([1, 2], index=[1, 1])

In [3]: b = pd.Series([10, 10], index=[1, 2])

In [4]: a
Out[4]: 
1    1
1    2
dtype: int64

In [5]: b
Out[5]: 
1    10
2    10
dtype: int64

In [6]: a + b
Out[6]: 
1    11.0
1    12.0
2     NaN
dtype: float64"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>

<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">1</span>])

<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">10</span>, <span class="pl-c1">10</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>])

<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">a</span>
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]: 
<span class="pl-c1">1</span>    <span class="pl-c1">1</span>
<span class="pl-c1">1</span>    <span class="pl-c1">2</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>

<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">b</span>
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: 
<span class="pl-c1">1</span>    <span class="pl-c1">10</span>
<span class="pl-c1">2</span>    <span class="pl-c1">10</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>

<span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">a</span> <span class="pl-c1">+</span> <span class="pl-s1">b</span>
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]: 
<span class="pl-c1">1</span>    <span class="pl-c1">11.0</span>
<span class="pl-c1">1</span>    <span class="pl-c1">12.0</span>
<span class="pl-c1">2</span>     <span class="pl-v">NaN</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div>
<h3 dir="auto">Pandas 0.19rc1</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import pandas as pd

In [2]: a = pd.Series([1, 2], index=[1, 1])

In [3]: b = pd.Series([10, 10], index=[1, 2])

In [4]: a
Out[4]: 
1    1
1    2
dtype: int64

In [5]: b
Out[5]: 
1    10
2    10
dtype: int64

In [6]: a + b
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-6-f96fb8f649b6&gt; in &lt;module&gt;()
----&gt; 1 a + b

/home/mrocklin/Software/anaconda/lib/python3.5/site-packages/pandas/core/ops.py in wrapper(left, right, name, na_op)
    671             return NotImplemented
    672 
--&gt; 673         left, right = _align_method_SERIES(left, right)
    674 
    675         converted = _Op.get_op(left, right, name, na_op)

/home/mrocklin/Software/anaconda/lib/python3.5/site-packages/pandas/core/ops.py in _align_method_SERIES(left, right, align_asobject)
    613                                                 return_indexers=True)
    614             # if DatetimeIndex have different tz, convert to UTC
--&gt; 615             left.index = index
    616             right.index = index
    617 

/home/mrocklin/Software/anaconda/lib/python3.5/site-packages/pandas/core/generic.py in __setattr__(self, name, value)
   2754         try:
   2755             object.__getattribute__(self, name)
-&gt; 2756             return object.__setattr__(self, name, value)
   2757         except AttributeError:
   2758             pass

pandas/src/properties.pyx in pandas.lib.AxisProperty.__set__ (pandas/lib.c:44336)()

/home/mrocklin/Software/anaconda/lib/python3.5/site-packages/pandas/core/series.py in _set_axis(self, axis, labels, fastpath)
    306         object.__setattr__(self, '_index', labels)
    307         if not fastpath:
--&gt; 308             self._data.set_axis(axis, labels)
    309 
    310     def _set_subtyp(self, is_all_dates):

/home/mrocklin/Software/anaconda/lib/python3.5/site-packages/pandas/core/internals.py in set_axis(self, axis, new_labels)
   2774             raise ValueError('Length mismatch: Expected axis has %d elements, '
   2775                              'new values have %d elements' %
-&gt; 2776                              (old_len, new_len))
   2777 
   2778         self.axes[axis] = new_labels

ValueError: Length mismatch: Expected axis has 3 elements, new values have 5 elements"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>

<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">1</span>])

<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">10</span>, <span class="pl-c1">10</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>])

<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">a</span>
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]: 
<span class="pl-c1">1</span>    <span class="pl-c1">1</span>
<span class="pl-c1">1</span>    <span class="pl-c1">2</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>

<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">b</span>
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: 
<span class="pl-c1">1</span>    <span class="pl-c1">10</span>
<span class="pl-c1">2</span>    <span class="pl-c1">10</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>

<span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">a</span> <span class="pl-c1">+</span> <span class="pl-s1">b</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-c1">-</span>
<span class="pl-v">ValueError</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">6</span><span class="pl-c1">-</span><span class="pl-s1">f96fb8f649b6</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">a</span> <span class="pl-c1">+</span> <span class="pl-s1">b</span>

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">mrocklin</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</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">ops</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">wrapper</span>(<span class="pl-s1">left</span>, <span class="pl-s1">right</span>, <span class="pl-s1">name</span>, <span class="pl-s1">na_op</span>)
    <span class="pl-c1">671</span>             <span class="pl-k">return</span> <span class="pl-v">NotImplemented</span>
    <span class="pl-c1">672</span> 
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">673</span>         <span class="pl-s1">left</span>, <span class="pl-s1">right</span> <span class="pl-c1">=</span> <span class="pl-en">_align_method_SERIES</span>(<span class="pl-s1">left</span>, <span class="pl-s1">right</span>)
    <span class="pl-c1">674</span> 
    <span class="pl-c1">675</span>         <span class="pl-s1">converted</span> <span class="pl-c1">=</span> <span class="pl-s1">_Op</span>.<span class="pl-en">get_op</span>(<span class="pl-s1">left</span>, <span class="pl-s1">right</span>, <span class="pl-s1">name</span>, <span class="pl-s1">na_op</span>)

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">mrocklin</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</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">ops</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_align_method_SERIES</span>(<span class="pl-s1">left</span>, <span class="pl-s1">right</span>, <span class="pl-s1">align_asobject</span>)
    <span class="pl-c1">613</span>                                                 <span class="pl-s1">return_indexers</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
    <span class="pl-c1">614</span>             <span class="pl-c"># if DatetimeIndex have different tz, convert to UTC</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">615</span>             <span class="pl-s1">left</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">index</span>
    <span class="pl-c1">616</span>             <span class="pl-s1">right</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">index</span>
    <span class="pl-c1">617</span> 

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">mrocklin</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</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">generic</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__setattr__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">name</span>, <span class="pl-s1">value</span>)
   <span class="pl-c1">2754</span>         <span class="pl-k">try</span>:
   <span class="pl-c1">2755</span>             <span class="pl-s1">object</span>.<span class="pl-en">__getattribute__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">name</span>)
<span class="pl-c1">-&gt;</span> <span class="pl-c1">2756</span>             <span class="pl-k">return</span> <span class="pl-s1">object</span>.<span class="pl-en">__setattr__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">name</span>, <span class="pl-s1">value</span>)
   <span class="pl-c1">2757</span>         <span class="pl-k">except</span> <span class="pl-v">AttributeError</span>:
   <span class="pl-c1">2758</span>             <span class="pl-k">pass</span>

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">src</span><span class="pl-c1">/</span><span class="pl-s1">properties</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">lib</span>.<span class="pl-v">AxisProperty</span>.<span class="pl-en">__set__</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">lib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">44336</span>)()

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">mrocklin</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</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">series</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_set_axis</span>(<span class="pl-s1">self</span>, <span class="pl-s1">axis</span>, <span class="pl-s1">labels</span>, <span class="pl-s1">fastpath</span>)
    <span class="pl-c1">306</span>         <span class="pl-s1">object</span>.<span class="pl-en">__setattr__</span>(<span class="pl-s1">self</span>, <span class="pl-s">'_index'</span>, <span class="pl-s1">labels</span>)
    <span class="pl-c1">307</span>         <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">fastpath</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">308</span>             <span class="pl-s1">self</span>.<span class="pl-s1">_data</span>.<span class="pl-en">set_axis</span>(<span class="pl-s1">axis</span>, <span class="pl-s1">labels</span>)
    <span class="pl-c1">309</span> 
    <span class="pl-c1">310</span>     <span class="pl-k">def</span> <span class="pl-en">_set_subtyp</span>(<span class="pl-s1">self</span>, <span class="pl-s1">is_all_dates</span>):

<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">mrocklin</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</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">set_axis</span>(<span class="pl-s1">self</span>, <span class="pl-s1">axis</span>, <span class="pl-s1">new_labels</span>)
   <span class="pl-c1">2774</span>             <span class="pl-s1">raise</span> <span class="pl-v">ValueError</span>(<span class="pl-s">'Length mismatch: Expected axis has %d elements, '</span>
   <span class="pl-c1">2775</span>                              <span class="pl-s">'new values have %d elements'</span> <span class="pl-c1">%</span>
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2776</span>                              (<span class="pl-s1">old_len</span>, <span class="pl-s1">new_len</span>))
   <span class="pl-c1">2777</span> 
   <span class="pl-c1">2778</span>         <span class="pl-s1">self</span>.<span class="pl-s1">axes</span>[<span class="pl-s1">axis</span>] <span class="pl-c1">=</span> <span class="pl-s1">new_labels</span>

<span class="pl-v">ValueError</span>: <span class="pl-v">Length</span> <span class="pl-s1">mismatch</span>: <span class="pl-v">Expected</span> <span class="pl-s1">axis</span> <span class="pl-s1">has</span> <span class="pl-c1">3</span> <span class="pl-s1">elements</span>, <span class="pl-s1">new</span> <span class="pl-s1">values</span> <span class="pl-s1">have</span> <span class="pl-c1">5</span> <span class="pl-s1">elements</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def get_candidates_3(closing, sales, settings: dict=_default_) -&gt; list:
        
    S = sales.loc[:closing['future_cap'], :]  # sales were sorted by date beforehand
    mask = (S['building_id'] == closing['building_id'])|(S['unit_bbl'] == closing['bbl'])
    ... 
    if mask.any():
        return S.loc[mask, 'id'].tolist()
    return []

sample.apply(get_candidates_3, reduce=True, axis=1,
             sales=sales_ts,settings=_default_)"><pre class="notranslate"><code class="notranslate">def get_candidates_3(closing, sales, settings: dict=_default_) -&gt; list:
        
    S = sales.loc[:closing['future_cap'], :]  # sales were sorted by date beforehand
    mask = (S['building_id'] == closing['building_id'])|(S['unit_bbl'] == closing['bbl'])
    ... 
    if mask.any():
        return S.loc[mask, 'id'].tolist()
    return []

sample.apply(get_candidates_3, reduce=True, axis=1,
             sales=sales_ts,settings=_default_)
</code></pre></div>
<p dir="auto">( python 3.6, pandas 0.21.0 )</p>
<p dir="auto">The behavior I want to achieve is to get a single column of lists.<br>
However, despite <code class="notranslate">reduce=True</code> this <code class="notranslate">apply</code> tries to map returned list as a series (?), raising the following:</p>
<p dir="auto"><code class="notranslate">ValueError: Shape of passed values is (10, 8), indices imply (10, 23)</code><br>
(here, 10 is the size of the sample, 23 is the number of columns in the sample, 8 is the number of elements in the list that was returned for the first column?</p>
<p dir="auto">When I change <code class="notranslate">get_candidates_3</code> to return set instead, I get a full new dataframe of the same shape (10,23), filled with exactly the same sets row-wise, instead.</p>
<p dir="auto">I am pretty sure I was using the same pattern successfully with a previous version...</p>