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

@kvh kvh 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
Copy link
Contributor

cherry-picked. Thanks for the PR.

@wesm
Copy link
Member

wesm commented Nov 24, 2012

Got some merge issues in that last commit?

@changhiskhan
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants