-
Notifications
You must be signed in to change notification settings - Fork 655
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
FIX-#6651: make sure Series.between
works correctly
#6656
Conversation
Signed-off-by: Anatoly Myachev <[email protected]>
modin/pandas/series.py
Outdated
return self.__constructor__( | ||
query_compiler=self._query_compiler.between(left, right, inclusive) | ||
query_compiler=self._query_compiler.between( | ||
left=left, right=right, inclusive=inclusive | ||
) | ||
) |
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.
it looks like the logic of this method can be easily implemented at the front end, I believe we don't need to add this new qc method.
We can either copy the pandas' logic or just pass our own object to the pandas method:
def between(self, left, right, inclusive):
# 'pandas.between()' only uses public Series' API, so passing a Modin Series there is safe
return pandas.Series.between(self, left, right, inclusive)
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.
Interesting! Let's try.
Signed-off-by: Anatoly Myachev <[email protected]> Co-authored-by: Dmitry Chigarev <[email protected]>
@dchigarev let's merge |
) | ||
# 'pandas.Series.between()' only uses public Series' API, | ||
# so passing a Modin Series there is safe | ||
return pandas.Series.between(self, left, right, inclusive) |
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.
I wouldn't rely on pandas to handle Modin objects properly. We should probably pass a pandas Series or a numpy array in to the method.
…odin-project#6656) Signed-off-by: Anatoly Myachev <[email protected]> Co-authored-by: Dmitry Chigarev <[email protected]>
What do these changes do?
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date