Skip to content

bug in density attribute computation for SparseSeries #2803

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

Closed
benjello opened this issue Feb 5, 2013 · 1 comment
Closed

bug in density attribute computation for SparseSeries #2803

benjello opened this issue Feb 5, 2013 · 1 comment
Labels
Milestone

Comments

@benjello
Copy link
Contributor

benjello commented Feb 5, 2013

ts = Series(randn(10))
ts[2:-2] = nan
sts = ts.to_sparse()
print sts
print sts.density

results in:

return float(len(self.sp_index)) / len(self.index)
TypeError: object of type 'pandas._sparse.BlockIndex' has no len()

@ghost
Copy link

ghost commented Mar 18, 2013

fixed in master. 279329b.

thanks for the report.

@ghost ghost closed this as completed Mar 18, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant