-
Notifications
You must be signed in to change notification settings - Fork 358
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
Make is_monotonic~ work properly for index #930
Conversation
@itholic Good catch! >>> pser
0.097069 0.097069
0.674804 0.674804
0.417065 0.417065
dtype: float64
>>> pser.is_monotonic
False
>>> pser.index.is_monotonic
False
>>> ks.from_pandas(pser).is_monotonic
True
>>> ks.from_pandas(pser).index.is_monotonic
False maybe we need to apply the fix for Index to Series' case as well. |
Codecov Report
@@ Coverage Diff @@
## master #930 +/- ##
==========================================
+ Coverage 94.46% 94.47% +<.01%
==========================================
Files 34 34
Lines 6382 6393 +11
==========================================
+ Hits 6029 6040 +11
Misses 353 353
Continue to review full report at Codecov.
|
@ueshin , ah i missed it. just fixed it, Thanks for commenting :) |
Let me retrigger the build and let's see. |
@ueshin oops my comment removed by mistake; yeah let's see and maybe hyukjin is something doing for speed up build process. 😃 |
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.
LGTM otherwise
Softagram Impact Report for pull/930 (head commit: af68952)⭐ Change Overview
📄 Full report
Impact Report explained. Give feedback on this report to [email protected] |
Resolve #931 (The contents below is same as the contents of this issue)
When we use
is_monotonic_decreasing
oris_monotonic_increasing
for index,pandas works like below:
Since the index order is literally motononic decreasing, they return
True
But our case,
as seen above, it returns
False
.because our existing logic always order by index column before calculate the each rows increasing or decreasing.
So they always calculate result based on data column, not index column. (index column is always sorted since order by)
So i think maybe it is better to fix this logic to follow behavior of pandas one for index.