-
Notifications
You must be signed in to change notification settings - Fork 372
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
adding show()
option missingstring
to change the string that prints for missing
values
#1688
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
913207d
add option to change what string `missing` values print
IanButterworth 1f2e1d1
typo
IanButterworth b7d8257
col width now factors in `missingstring` width rather than default "m…
IanButterworth 0a08d16
Apply suggestions from code review (AbstractString)
bkamins eec04e7
add methods in dataframerow/show
IanButterworth b15c6f5
add test case for show(df, missingstring="-")
IanButterworth e1703d1
added to CSV, TSV, HTML and LaTeX
IanButterworth ba10e4f
test cases for latex, html and tsv/csv
IanButterworth 2f868cd
change default for latex to "missing"
IanButterworth 15ad8b3
fixing test failures
IanButterworth 51fb8fb
Merge branch 'master' into master
bkamins 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
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
function Base.show(io::IO, dfr::DataFrameRow; | ||
allcols::Bool = !get(io, :limit, false), | ||
splitcols = get(io, :limit, false), | ||
rowlabel::Symbol = :Row) | ||
rowlabel::Symbol = :Row, | ||
missingstring::AbstractString = "missing") | ||
r, c = parentindices(dfr) | ||
print(io, "DataFrameRow") | ||
_show(io, view(parent(dfr), [r], c), allcols=allcols, splitcols=splitcols, | ||
rowlabel=rowlabel, summary=false, rowid=r) | ||
rowlabel=rowlabel, summary=false, missingstring=missingstring, rowid=r) | ||
end | ||
|
||
Base.show(dfr::DataFrameRow; | ||
allcols::Bool = !get(io, :limit, true), | ||
splitcols = get(io, :limit, true), | ||
rowlabel::Symbol = :Row) = | ||
show(stdout, dfr, allcols=allcols, splitcols=splitcols, rowlabel=rowlabel) | ||
rowlabel::Symbol = :Row, | ||
missingstring::AbstractString = "missing") = | ||
show(stdout, dfr, allcols=allcols, splitcols=splitcols, rowlabel=rowlabel, missingstring=missingstring) |
This file contains 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
Oops, something went wrong.
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.
can you please correctly align the indentation of the code here and in all places below/