@@ -17,6 +17,11 @@ Table-level metadata are key-value pairs that are attached to `df`.
1717Column-level metadata are key-value pairs that are attached to
1818a specific column ` col ` of ` df ` data frame.
1919
20+ To check whether some key ` key ` is present in table-level metadata of data frame ` df `
21+ you can write ` key in metadatakeys(df) ` . Similarly to check whether key ` key ` is present
22+ in column-level metadata of data frame ` df ` for column ` col ` write
23+ ` key in colmetadatakeys(df, col) ` .
24+
2025Additionally each metadata key-value pair has a style information attached to
2126it.
2227In DataFrames.jl the metadata style influences how metadata is propagated when
@@ -53,9 +58,9 @@ functions. In this section collectively these objects will be called
5358* [ ` SubDataFrame ` ] ( @ref ) and [ ` DataFrameRow ` ] ( @ref ) only expose metadata from
5459 their parent ` DataFrame ` whose style is ` :note ` .
5560
56- Notably metadata is not supported for [ ` GroupedDataFrame ` ] ( @ref ) as it does not
57- expose columns directly. You can inspect metadata of the ` parent ` of a
58- [ ` GroupedDataFrame ` ] ( @ref ) or of any of its groups .
61+ Notably, metadata is not supported for [ ` GroupedDataFrame ` ] ( @ref ) and you can't
62+ add, modify, nor view metadata through the [ ` GroupedDataFrame ` ] ( @ref ) itself.
63+ It is possible only through its ` parent ` .
5964
6065!!! note
6166
@@ -121,6 +126,9 @@ julia> collect(metadatakeys(df))
1211261-element Vector{String}:
122127 "caption"
123128
129+ julia> "caption" in metadatakeys(df)
130+ true
131+
124132julia> metadata(df, "caption")
125133"ELO ratings of chess players"
126134
@@ -141,6 +149,9 @@ julia> colmetadata!(df, :date, "label", "Rating date in yyyy-u format", style=:n
141149
142150julia> colmetadata!(df, :rating, "label", "ELO rating in classical time control", style=:note);
143151
152+ julia> "label" in colmetadatakeys(df, :rating)
153+ true
154+
144155julia> colmetadata(df, :rating, "label")
145156"ELO rating in classical time control"
146157
0 commit comments