Skip to content

(1) add a get() method like dicts have, (2) throw KeyError, not Exception, when a column isn't found #521

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
wants to merge 1 commit into from

Conversation

bshanks
Copy link

@bshanks bshanks commented Dec 21, 2011

No description provided.

@@ -1203,6 +1203,13 @@ def pop(self, item):
"""
return NDFrame.pop(self, item)

def get(self, column, default=None):
try:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring, pretty please? in the style of the rest of the library preferably :)

@wesm
Copy link
Member

wesm commented Dec 26, 2011

Thanks. I added a docstring and unit test coverage in the above referenced commit-- good practice going forward

@wesm wesm closed this Dec 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants