Skip to content

TST: added test for cut when labels are tuples of Timestamps (#40661) #43850

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

Merged
merged 2 commits into from
Oct 3, 2021

Conversation

Svanazar
Copy link
Contributor

@Svanazar Svanazar commented Oct 2, 2021

Added a test for the cut method which uses Timestamp tuples as labels. Using cut with such labels raised error in v1.2.3 as reported in the issue, but it runs correctly after v1.3.0.

@debnathshoham debnathshoham added cut cut, qcut Testing pandas testing functions or related to the test suite labels Oct 2, 2021
@debnathshoham debnathshoham added this to the 1.4 milestone Oct 2, 2021
def test_cut_with_timestamp_tuple_labels():
# GH 40661
data = [2, 4, 6]
bins = [1, 3, 5, 7]
Copy link
Member

Choose a reason for hiding this comment

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

You don't have to define data and bins, you are using it only once. Can directly pass it into cut

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes definitely. Thank you 👍

@Svanazar Svanazar requested a review from phofl October 3, 2021 09:48
@jreback jreback merged commit 1770df4 into pandas-dev:master Oct 3, 2021
@jreback
Copy link
Contributor

jreback commented Oct 3, 2021

thanks @Svanazar

@Svanazar Svanazar deleted the test-cut-tstamp-tuple branch October 3, 2021 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cut cut, qcut Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: cut with labels Tuple[Timestamp, ...] -> wrong number of dimensions
4 participants