Skip to content

BUG: Series.get w boolean accessor #7407

Closed
@jreback

Description

@jreback

from ML: https://groups.google.com/forum/#!topic/pydata/CDnF9cNR2ho

In [10]: df=pd.DataFrame({'i':[0]*10, 'b':[False]*10})

In [11]: vc_i=df.i.value_counts()

In [12]: vc_i.get(99,default='Missing')
Out[12]: 'Missing'

In [13]: vc_b=df.b.value_counts()

In [14]: vc_b
Out[14]: 
False    10
dtype: int64

In [15]: vc_b.get(False,default='Missing')
Out[15]: 10

In [16]: vc_b.get(True,default='Missing')

IndexError: index out of bounds

Metadata

Metadata

Assignees

No one assigned

    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