Skip to content
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

Make sparse DataFrame and Series construction more efficient #2322

Closed
wants to merge 1 commit into from

Conversation

@kvh
Copy link
Contributor

commented Nov 21, 2012

Cleans up SparseSeries and SparseDataFrame initialization code so no objects are created unnecessarily. Currently if you run the (potentially useless) statement:

SparseDataFrame(columns=np.arange(100000), index=np.arange(100000))

pandas will consume memory and time filling in empty Series objects only to then compress them away.

Added to test to ensure SparseDataFrame always initializes with SparseSeries. Otherwise functionality should be preserved.

changhiskhan pushed a commit that referenced this pull request Nov 24, 2012
@changhiskhan

This comment has been minimized.

Copy link
Contributor

commented Nov 24, 2012

cherry-picked. Thanks for the PR.

@wesm

This comment has been minimized.

Copy link
Member

commented Nov 24, 2012

Got some merge issues in that last commit?

@changhiskhan

This comment has been minimized.

Copy link
Contributor

commented Nov 24, 2012

Yeah in RELEASE.rst. I pushed a fix already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.