Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Make sparse DataFrame and Series construction more efficient #2322
Cleans up SparseSeries and SparseDataFrame initialization code so no objects are created unnecessarily. Currently if you run the (potentially useless) statement:
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.