Pandas series .to_sparse() raises: TypeError("cannot concatenate a non-NDFrame object")
<p>I have a Pandas Series object (<a href="https://github.com/UdyatGithub/PyntCloud/blob/master/pyntcloud/SO_issue.csv" rel="nofollow">LINK TO DATA EXAMPLE</a>):</p>

<pre><code>type(ts)
Out[54]: pandas.core.series.Series

ts.isnull().sum()
Out[16]: 2744

ts.size
Out[17]: 4096

ts.dtype
Out[19]: dtype('float64')
</code></pre>

<p>And I'm getting this error when I try to convert the series to a <a href="http://pandas.pydata.org/pandas-docs/stable/sparse.html" rel="nofollow">Sparse data structure</a> by using <code>to_sparse</code></p>

<pre><code>ts.to_sparse()
Traceback (most recent call last):

  File "/home/david/anaconda3/lib/python3.5/site-packages/IPython/core/formatters.py", line 699, in __call__
    printer.pretty(obj)

  File "/home/david/anaconda3/lib/python3.5/site-packages/IPython/lib/pretty.py", line 383, in pretty
    return _default_pprint(obj, self, cycle)

  File "/home/david/anaconda3/lib/python3.5/site-packages/IPython/lib/pretty.py", line 503, in _default_pprint
    _repr_pprint(obj, p, cycle)

  File "/home/david/anaconda3/lib/python3.5/site-packages/IPython/lib/pretty.py", line 694, in _repr_pprint
    output = repr(obj)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/base.py", line 63, in __repr__
    return str(self)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/base.py", line 42, in __str__
    return self.__unicode__()

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/sparse/series.py", line 287, in __unicode__
    series_rep = Series.__unicode__(self)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 959, in __unicode__
    max_rows=max_rows)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 1000, in to_string
    dtype=dtype, name=name, max_rows=max_rows)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/series.py", line 1027, in _get_repr
    max_rows=max_rows)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/format.py", line 144, in __init__
    self._chk_truncate()

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/core/format.py", line 158, in _chk_truncate
    series.iloc[-row_num:]))

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/tools/merge.py", line 834, in concat
    copy=copy)

  File "/home/david/anaconda3/lib/python3.5/site-packages/pandas/tools/merge.py", line 890, in __init__
    raise TypeError("cannot concatenate a non-NDFrame object")

TypeError: cannot concatenate a non-NDFrame object
</code></pre>

<p>I really don't understand why this error is raising and I would like to know what is happening.</p>