Skip to content

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

Closed
@jreback

Description

@jreback

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

No one assigned

    Labels

    BugEnhancementIndexingRelated to indexing on series/frames, not to indexes themselvesSparseSparse Data Type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions