Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeffebach committed Feb 27, 2024
1 parent 2d92d81 commit c4a1736
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,29 @@ Print the notes and labels in a data frame.
For the purposes of printing, column labels are printed in
addition to notes. However column labels are not returned by
`note(df, col)`.
```
julia> df = DataFrame(wage = [12], age = [23]);
julia> @label! df :age = "Age (years)";
julia> @note! df :wage = "Derived from American Community Survey";
julia> @note! df :wage = "Missing values imputed as 0 wage";
julia> @label! df :wage = "Hourly wage (2015 USD)";
julia> printnotes(df)
Column: wage
────────────
Label: Hourly wage (2015 USD)
Derived from American Community Survey
Missing values imputed as 0 wage
Column: age
───────────
Label: Age (years)
```
"""
function printnotes(df, cols = All(); unnoted = false)
nms = names(df, cols)
Expand Down

0 comments on commit c4a1736

Please sign in to comment.