pydata/pandas — pull request #2322 by kvh (2012-11-21 23:56:33+00:00)
Title: Make sparse DataFrame and Series construction more efficient

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.