-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
CLN: Address some TODO comments #23208
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
Conversation
|
Hello @mroeschke! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #23208 +/- ##
==========================================
+ Coverage 92.19% 92.2% +<.01%
==========================================
Files 169 169
Lines 50950 50943 -7
==========================================
- Hits 46975 46972 -3
+ Misses 3975 3971 -4
Continue to review full report at Codecov.
|
pandas/core/frame.py
Outdated
| def _put_str(s, space): | ||
| return u'{s}'.format(s=s)[:space].ljust(space) | ||
|
|
||
|
|
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.
don't put this here, pandas/core/indexing.py is better or pandas/core/index/api.py
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.
_get_info_slice is only used once in frame.py and nowhere else. I was thinking we might as well avoid the import.
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.
ok, can you just inline it then where it is used (make it a local function) instead.
| exclude_these.iloc[idx] = not any(map(f, exclude)) | ||
|
|
||
| dtype_indexer = include_these & exclude_these | ||
| return self.loc[com.get_info_slice(self, dtype_indexer)] |
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.
just move the local function here
|
thanks! |
git diff upstream/master -u -- "*.py" | flake8 --diffI am technically moving some public (non top level) helper functions and making them private, but I don't think it warrants a depreciation.