-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add metadata macros #377
Add metadata macros #377
Conversation
This is ready for a review. The API is very minimal. However I do add two functions, Maybe we can have |
Long discussion of variable construction. | ||
``` | ||
|
||
Unlike labels, notes are appended. |
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 agree here, but then maybe add a comment how to remove a note from a column?
Thank you. Looks good. I would leave |
I beefed up the printing a little, trying to make it as useful as possible. We can change the API at 1.0 if people don't like it. But I think it's pretty useful. This is ready for merging. API of printing: Labels
Pretty-print all labels in a data frame. Arguments
Examplesjulia> df = DataFrame(wage = [12], age = [23]);
julia> @label! df :wage = "Hourly wage (2015 USD)";
julia> printlabels(df)
┌────────┬────────────────────────┐
│ Column │ Label │
├────────┼────────────────────────┤
│ wage │ Hourly wage (2015 USD) │
│ age │ age │
└────────┴────────────────────────┘
julia> printlabels(df, :wage)
┌────────┬────────────────────────┐
│ Column │ Label │
├────────┼────────────────────────┤
│ wage │ Hourly wage (2015 USD) │
└────────┴────────────────────────┘
julia> printlabels(df; unlabelled = false)
┌────────┬────────────────────────┐
│ Column │ Label │
├────────┼────────────────────────┤
│ wage │ Hourly wage (2015 USD) │
└────────┴────────────────────────┘
julia> printlabels(df, r"^wage")
┌────────┬────────────────────────┐
│ Column │ Label │
├────────┼────────────────────────┤
│ wage │ Hourly wage (2015 USD) │
└────────┴────────────────────────┘ Notes
Print the notes and labels in a data frame. Arguments
For the purposes of printing, column labels are printed in
|
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.
Looks good. Just merge conflicts need to be resolved.
Thanks! Will merge! |
Description of API to come