Skip to content

Cannot slice a SparseDataFrame's columns. #1585

Closed
@mcobzarenco

Description

@mcobzarenco

Example:

sdf = pandas.SparseDataFrame(index=[0, 1, 2], columns=['a', 'b','c'])

sdf[['a', 'b']]

/usr/lib64/python2.7/site-packages/pandas/sparse/frame.pyc in __getitem__(self, item)
    321         try:
    322             # unsure about how kludgy this is
--> 323             s = self._series[item]
    324             s.name = item
    325             return s

TypeError: unhashable type: 'list'

Metadata

Metadata

Assignees

Labels

BugIndexingRelated to indexing on series/frames, not to indexes themselves

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions