-
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
Implements Series.filter #1511
Implements Series.filter #1511
Conversation
a82cff3
to
8a0b9dc
Compare
fafc253
to
f66b934
Compare
Codecov Report
@@ Coverage Diff @@
## master #1511 +/- ##
=======================================
Coverage 94.19% 94.20%
=======================================
Files 38 38
Lines 8595 8608 +13
=======================================
+ Hits 8096 8109 +13
Misses 499 499
Continue to review full report at Codecov.
|
Ah, #1512 caused a conflict here. Can you rebase and resolve the conflicts please? |
40e2db1
to
7256a23
Compare
34abf72
to
153b930
Compare
153b930
to
0f944ef
Compare
…ulti-index function is added
@HyukjinKwon please check this.
|
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, thanks @beobest2
Sorry for the late review. Btw, this broke the docstring, I'll submit the PR to fix it anyway. |
the specified index. | ||
Note that this routine does not filter a dataframe on its | ||
contents. The filter is applied to the labels of the index. | ||
Parameters |
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.
Ah .. I didn't notice the newlines disappeared here.. it breaks the doc rendering. Let's be careful next time.
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.
Oppse I'll be careful next time. I'm Sorry
Okay, I had a offline discussion. We have been following pandas' structure so far. However, now it became kind of a bit weird for some instances in These will be cleaned up in a separate PR. |
Addressing a comment #1511 (comment).
@HyukjinKwon Thanks for sharing, makes sense. |
I don't look into all of the function in def some_function(self, ...):
... preprocess ...
if isinstance(self, Series):
kdf = self.to_frame()
else:
kdf = self
... working with kdf and the result is ret ...
if isinstance(self, Series):
return first_series(ret)
else:
return ret Then we should move it to def some_function(self, ...):
... preprocess ...
return first_series(self.to_frame().some_function(...)) |
Anyway I'll submit PRs when I encounter the pattern. |
Implementing
Series.filter