-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
self._bins_int = bins | ||
def __init__(self, bins: typing.Union[int, pd.IntervalIndex]): | ||
if isinstance(bins, int): | ||
self._bins_int = bins |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
0dec2b0
to
52a1558
Compare
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:
Updated docs:
https://screenshot.googleplex.com/vVXiRKAEhTsJt3x
https://screenshot.googleplex.com/3BeHiKUs69AMjeY
Fixes b/309964553