Rename columns in Table¶
Rename the Table columns.
Documentation¶
Rename columns in Table(s).
Select Text Mode to match column names with the search pattern as plain text. Select Regex Mode to use a regular expression (regex) for pattern matching. For more information about how to write regex, see Regular expression syntax.
In Regex mode group references may be used in the replacement expression.
If several columns match the search expression resulting in the same column name, the last of the matching columns will be copied to the output and the other columns will be removed. Note that renamed columns (i.e. any columns that match the search expression) always take precedence over non-renamed ones.
Definition¶
Input ports¶
- Input table
Input
Output ports¶
- Output table
Output
Configuration¶
- Replace (dst_expr)
Specify the replacement string.
- Match full column name (full_match)
If checked, only rename a column whose full column name matches the search pattern. I unchecked, rename any column where the search pattern matches any part of the column name.
- Mode (mode)
Choose between Text and Regex
- Search (src_expr)
Specify the search pattern that will be replaced. The pattern will be interpreted as regex in Regex mode. Learn more about Regular expression syntax in the documentation appendix.
Examples¶
Implementation¶
- class node_rename_columns.RenameTableColumns[source]