Skip to content
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

DEPR: casting in DatetimeLikeArrayMixin.isin #53111

Closed
3 tasks done
jbrockmendel opened this issue May 5, 2023 · 2 comments · Fixed by #56427
Closed
3 tasks done

DEPR: casting in DatetimeLikeArrayMixin.isin #53111

jbrockmendel opened this issue May 5, 2023 · 2 comments · Fixed by #56427
Labels
API Design datetime.date stdlib datetime.date support Deprecate Functionality to remove in pandas

Comments

@jbrockmendel
Copy link
Member

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

NA

Issue Description

DatetimeLikeArrayMixin.isin casts pretty aggressively. In particular I think we shouldn't be parsing strings here. We should deprecate and tell users to cast explicitly.

Expected Behavior

NA

Installed Versions

Replace this line with the output of pd.show_versions()

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 5, 2023
@topper-123
Copy link
Contributor

topper-123 commented May 12, 2023

So just to be clear, it's allowed to do e.g. dt_arr.isin(['2018-01-01', '2018-01-02']) and we should deprecate this and make the users convert to first, e.g. dt_arr.isin(pd.array(['2018-01-01', '2018-01-02'], dtype=" datetime64[ns]"))?

+1 from me to that.

@topper-123 topper-123 added API Design Deprecate Functionality to remove in pandas datetime.date stdlib datetime.date support and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 12, 2023
@jbrockmendel
Copy link
Member Author

Yes that is what I have in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design datetime.date stdlib datetime.date support Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants