Skip to content

BUG: Series.get w boolean accessor #7407

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

Closed
jreback opened this issue Jun 9, 2014 · 0 comments · Fixed by #7638
Closed

BUG: Series.get w boolean accessor #7407

jreback opened this issue Jun 9, 2014 · 0 comments · Fixed by #7638
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jun 9, 2014

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant