Skip to content

feat: update cut to work without labels = False and show intervals as dict #335

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 11 commits into from
Jan 23, 2024

Conversation

Genesis929
Copy link
Collaborator

@Genesis929 Genesis929 commented Jan 20, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Code example updates:
https://screenshot.googleplex.com/ApQyMsLXCByk7z8
https://screenshot.googleplex.com/5jFfvntpbX5djv3

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jan 20, 2024
@Genesis929 Genesis929 marked this pull request as ready for review January 20, 2024 01:59
@Genesis929 Genesis929 requested review from a team as code owners January 20, 2024 01:59
@Genesis929 Genesis929 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 20, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 20, 2024
@Genesis929 Genesis929 changed the title feat: update cut to work without labels = False feat: update cut to work without labels = False and show intervals as dict Jan 20, 2024
@Genesis929 Genesis929 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 22, 2024
@bigframes-bot bigframes-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 22, 2024
3 {'left_exclusive': 7.5, 'right_inclusive': 10.0}
dtype: struct<left_exclusive: double, right_inclusive: double>[pyarrow]

Cut with an integer (equal-width bins) and labels=False:
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems labels=True is also acceptable. Can we include a code sample for that?

Copy link
Collaborator Author

@Genesis929 Genesis929 Jan 23, 2024

Choose a reason for hiding this comment

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

Was adding this to avoid the confusing case in pandas that labels can be false but can not be true, so I made labels = True works the same as labels = None. But it would appear this may be more confusing. Changed the code back so that now labels won't be able to be True as in pandas.

@Genesis929 Genesis929 requested a review from shobsi January 23, 2024 20:31
@Genesis929 Genesis929 merged commit 4ff53db into main Jan 23, 2024
@Genesis929 Genesis929 deleted the huanc-cut-labels branch January 23, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants