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

feat: Add IntervalIndex support to bigframes.pandas.cut #254

Merged
merged 7 commits into from
Dec 18, 2023

Conversation

Genesis929
Copy link
Collaborator

@Genesis929 Genesis929 commented Dec 4, 2023

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)

Updated docs:
https://screenshot.googleplex.com/vVXiRKAEhTsJt3x
https://screenshot.googleplex.com/3BeHiKUs69AMjeY

Fixes b/309964553

@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 Dec 4, 2023
@Genesis929 Genesis929 changed the title feature: Add IntervalIndex support to bigframes.pandas.cut feat: Add IntervalIndex support to bigframes.pandas.cut Dec 4, 2023
@Genesis929 Genesis929 added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 4, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 4, 2023
@Genesis929 Genesis929 marked this pull request as ready for review December 4, 2023 23:38
@Genesis929 Genesis929 requested review from a team as code owners December 4, 2023 23:38
self._bins_int = bins
def __init__(self, bins: typing.Union[int, pd.IntervalIndex]):
if isinstance(bins, int):
self._bins_int = bins
Copy link
Contributor

@shobsi shobsi Dec 12, 2023

Choose a reason for hiding this comment

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

This might be a good place to check bins>0. I know we are doing it in the cut method, but this is a public class as well, and also contains the business logic if-else at line 243.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, added a check here.

@Genesis929 Genesis929 requested a review from shobsi December 12, 2023 23:20
@shobsi shobsi added automerge Merge the pull request once unit tests and other checks pass. and removed automerge Merge the pull request once unit tests and other checks pass. labels Dec 14, 2023
@Genesis929 Genesis929 merged commit 6c1969a into main Dec 18, 2023
14 of 15 checks passed
@Genesis929 Genesis929 deleted the huanc-cut-b309964553 branch December 18, 2023 20:34
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.

2 participants