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

BUG/ENH: cross sectional on a Sparse DataFrame is unimplemented/buggy #6076

Closed
jreback opened this issue Jan 24, 2014 · 0 comments
Closed

BUG/ENH: cross sectional on a Sparse DataFrame is unimplemented/buggy #6076

jreback opened this issue Jan 24, 2014 · 0 comments
Labels
Bug Enhancement Indexing Related to indexing on series/frames, not to indexes themselves Sparse Sparse Data Type
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

http://stackoverflow.com/questions/21328945/pandas-accessing-rows-of-a-sparsedataframe

import numpy as np
import pandas as pd

df = pd.DataFrame(np.arange(15).reshape(5,3), index=list('abcde'))
df.loc['b',1] = np.nan  # for good measure...
sparse = df.to_sparse()

sparse[1]  # This is OK.
df.loc['b']  # This is also OK.
sparse.loc['b'] # This blows up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Enhancement Indexing Related to indexing on series/frames, not to indexes themselves Sparse Sparse Data Type
Projects
None yet
Development

No branches or pull requests

1 participant