Skip to content

Conversation

@jbrockmendel
Copy link
Member

No description provided.

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

Thanks @jbrockmendel . I think changing exception types and error messages should have a whatsnew. also in the case of Exception type, I would regard a change as a breaking change. not sure what others think. Should we have a deprecation for this?

@simonjayhawkins simonjayhawkins added Refactor Internal refactoring of code Index Related to the Index class or subclasses labels Jan 13, 2020
@jbrockmendel
Copy link
Member Author

I think changing exception types and error messages should have a whatsnew. also in the case of Exception type, I would regard a change as a breaking change. not sure what others think. Should we have a deprecation for this?

If it were on the Index subclasses I would agree, but for the DTA/TDA/PA (which we dont expect users to use directly) I think we're OK

@simonjayhawkins
Copy link
Member

If it were on the Index subclasses I would agree, but for the DTA/TDA/PA (which we dont expect users to use directly) I think we're OK

https://dev.pandas.io/docs/reference/api/pandas.array.html has examples on how to construct these.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

I agree with @simonjayhawkins we should have a whatsnew note, but its a very minor change IMHO. otherwise lgtm. ping on green.

I think after this PR you can then share the common code in searchsorted (at least for Index).

Co-Authored-By: Simon Hawkins <simonjayhawkins@gmail.com>
@jbrockmendel
Copy link
Member Author

ping

"searchsorted requires compatible dtype or scalar, "
f"not {type(value).__name__}"
)
if isinstance(value, Index):
Copy link
Contributor

Choose a reason for hiding this comment

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

can likely move this to the base class an use shared impl with Timedelta (and I guess with DTI?)

@jreback jreback merged commit 024925a into pandas-dev:master Jan 18, 2020
@jreback
Copy link
Contributor

jreback commented Jan 18, 2020

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Index Related to the Index class or subclasses Refactor Internal refactoring of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants