Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- '1.10'
- '1.12'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
Expand Down
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
TableMetadataTools = "9ce81f87-eacc-4366-bf80-b621a3098ee2"

Expand All @@ -15,9 +16,10 @@ Chain = "0.5, 0.6, 1"
DataFrames = "1"
MacroTools = "0.5"
OrderedCollections = "1"
PrettyTables = "2, 3"
Reexport = "0.2, 1"
julia = "1.6"
TableMetadataTools = "0.1"
julia = "1.10"

[extras]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down
13 changes: 12 additions & 1 deletion src/metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,21 @@ function printlabels(df, cols=All(); unlabelled = true)
end
end
t = DataFrame(Column = cs, Label = ls)
pretty_table(t; show_subheader = false)
_print_labels(t)
return nothing
end

# Support older PrettyTables for now
# (Will change when DataFrames.jl drops support)
# I can't just use keyword arguments provided by
# DataFrames.jl because I like the lines of the default
# printing
@static if pkgversion(PrettyTables).major == 2
_print_labels(t) = pretty_table(t; show_subheader = false)
else
_print_labels(t) = pretty_table(t; column_labels = [names(t)])
end

"""
printnotes(df, cols = All(); unnoted = false)

Expand Down
Loading