-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
BugEnhancementIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesSparseSparse Data TypeSparse Data Type
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
BugEnhancementIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesSparseSparse Data TypeSparse Data Type