Column Contexts
Column contexts can be used to organize columns inside a table. Taking the previous sciences example, column contexts enable us to organize the data like so.
Under the hood, column contexts are simply /
separated field names, and so the below code is equivalent.
Columns contexts can be moved, hidden, and focused on in the table, making it easy to view and organize your structured data in bulk.
As with contexts, unify.ColumnContext("...")
by default will also change the behaviour of get_logs
,
returning only the logs which are part of the column context.
As before, this behaviour can be change by setting unify.ColumnContext("...", mode="read")
which will only set the column context for log getting,
and unify.ColumnContext("...", mode="write")
which will only set the column context for log setting.
Note that the Log
instances will still show the full field paths, even when inside a column context.
Overall, column contexts make it easy to organize data inside your tables. Try them out with more examples of your own!