-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
ENH: enable Series.info() #37320
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
Merged
Merged
ENH: enable Series.info() #37320
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a903f32
TST: add series info tests
ivanovmg e07d6e2
TST: remove test that series has no info
ivanovmg 0990d54
ENH: add method Series.info
ivanovmg 1814795
REF: split tests for frame and series
ivanovmg 4c390a8
REF: param test on frame memory_usage_qualified
ivanovmg 81929e6
Merge branch 'master' into feature/series-info
ivanovmg 824d8d6
ENH: enable series info
ivanovmg ce68e94
CLN: remove extra parens
ivanovmg ede6dc4
REF: split series-related tests
ivanovmg 789e03e
DOC: add release note
ivanovmg f41596d
CLN: merge two lines
ivanovmg 40b71f8
DOC: unify series/frame docstrings, fix indent
ivanovmg 3e71336
REF: to_buffer -> render, unify func signature
ivanovmg 739c62d
Merge branch 'master' into feature/series-info
ivanovmg e9c5220
DOC: add versionadded tag
ivanovmg f7cb4f8
Merge branch 'master' into feature/series-info
ivanovmg def5ed6
Merge branch 'master' into feature/series-info
ivanovmg dd4205d
Merge branch 'master' into feature/series-info
ivanovmg e74cdce
DOC: maybe fix empty line problem with df.info
ivanovmg d41ecf1
DOC: remove trailing period in type
ivanovmg 98d0f55
Merge branch 'master' into feature/series-info
ivanovmg 0d1c5d8
Merge branch 'master' into feature/series-info
ivanovmg 816803e
Fix styling
ivanovmg 9e0198f
Merge branch 'master' into feature/series-info
ivanovmg 1e2aaef
DOC: move whatsnew info to v1.4.0
ivanovmg 688080b
DOC: move docs on Series.info() to io/formats/info.py
ivanovmg 4e87b1a
FIX: newline
ivanovmg dc999fe
FIX: change versionadded to 1.4.0
ivanovmg 4bb4e40
DOC: extract null_counts_sub for frames only
ivanovmg f114293
DOC: avoid duplication of kwargs replacement
ivanovmg 16ac96e
DOC: unify newlines/spacing with substitutions
ivanovmg aac2954
Revert "DOC: unify newlines/spacing with substitutions"
ivanovmg 22303dc
DOC: fix newlines substitutions
ivanovmg 9428a32
DOC: another attempt to fix newline
ivanovmg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
REF: to_buffer -> render, unify func signature
- Loading branch information
commit 3e71336b361a65e05e3fe5f01445bc9366fefbea
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4640,7 +4640,7 @@ def replace( | |
Series.memory_usage: Memory usage of Series.""" | ||
), | ||
) | ||
@doc(BaseInfo.to_buffer) | ||
@doc(BaseInfo.render) | ||
def info( | ||
self, | ||
verbose: Optional[bool] = None, | ||
|
@@ -4649,13 +4649,9 @@ def info( | |
memory_usage: Optional[Union[bool, str]] = None, | ||
null_counts: bool = True, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, but one thing at a time. Will wait for the public API update first. |
||
) -> None: | ||
if max_cols is not None: | ||
raise ValueError( | ||
"Argument `max_cols` can only be passed " | ||
"in DataFrame.info, not Series.info" | ||
) | ||
return SeriesInfo(self, memory_usage).to_buffer( | ||
return SeriesInfo(self, memory_usage).render( | ||
buf=buf, | ||
max_cols=max_cols, | ||
verbose=verbose, | ||
show_counts=null_counts, | ||
) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
the docstring for DataFrame.info is
I think this should be
might be able to use Literal here (see #37137) and maybe create an alias in typing . follow-on OK too.
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 tried to use Literal, but looks like that is available only starting from Python 3.8.