Skip to content

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Sep 28, 2013

closes #5016

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jtratner I had to do this to convert the TypeError (because in py3 it raises differently in 2), is there a 'better' way to detect this?

Copy link
Member

Choose a reason for hiding this comment

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

what can't be ordered here?

Copy link
Contributor

Choose a reason for hiding this comment

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

this is a Python 2/Python 3 difference.

None < 5 is True in Python 2, but is a TypeError in Python 3.

Copy link
Member

Choose a reason for hiding this comment

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

why not make a subclass of typeerror and just catch the different instances how you wnat to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to pass type errors upward but as u noticed above the comparison raises in py3 but not in 2
not so easy to trap the type error on the cases that we want

jreback added a commit that referenced this pull request Sep 28, 2013
BUG: Fix a bug when indexing np.nan via loc/iloc (GH5016)
@jreback jreback merged commit c2ed35a into pandas-dev:master Sep 28, 2013
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.

NaN in columns produces TypeError
3 participants