New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concat does not work for sparse series #10536

Closed
artemyk opened this Issue Jul 9, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@artemyk
Contributor

artemyk commented Jul 9, 2015

Concatenating two sparse series does not return sparse data structures as expected:

In [1]: import pandas as pd

In [2]: ts = pd.Series([0, 1, 1, 2, 3, 0 ,0 ,0])

In [3]: sts = ts.to_sparse()

In [4]: print type(pd.concat([sts, sts], axis=0))
<class 'pandas.core.series.Series'>

In [5]: print type(pd.concat([sts, sts], axis=1))
<class 'pandas.core.frame.DataFrame'>

The above does work correctly for SparseDataFrames.

@artemyk artemyk changed the title from concat does not work for sparse series to Concat does not work for sparse series Jul 9, 2015

@jreback jreback added this to the Next Major Release milestone Jul 11, 2015

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback Jul 11, 2015

Contributor

xref #10531

Contributor

jreback commented Jul 11, 2015

xref #10531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment