TimeFrame.decode_flag_column¶
- TimeFrame.decode_flag_column(flag_column_name)[source]¶
Decode a flag column from raw values to human-readable flag names.
For
BitwiseFlagColumn: replaces the integer column with aList(String)column of active flag names, sorted by ascending bit value. A value of 0 produces an empty list.For
CategoricalFlagColumnin scalar mode: replaces each raw value with its flag name (e.g.123 -> "good"), producing aUtf8column.For
CategoricalFlagColumnin list mode: replaces each value in the list with its flag name, producing aList(Utf8)column.The column remains registered as a flag column.
add_flagandremove_flagcontinue to work transparently on the decoded column.- Parameters:
flag_column_name (
str) – Name of the registered flag column to decode.- Return type:
- Returns:
A new TimeFrame with the flag column replaced by its decoded form.
- Raises:
ColumnNotFoundError – If flag_column_name is not a registered flag column.
ColumnTypeError – If the flag column is already in decoded form.