FreeMat

- Main Page
- Related Pages

vtkMergeTables

Section: Visualization Toolkit Infovis Classes

# Usage

Combines the columns of two tables into one larger table. The number of rows in the resulting table is the sum of the number of rows in each of the input tables. The number of columns in the output is generally the sum of the number of columns in each input table, except in the case where column names are duplicated in both tables. In this case, if MergeColumnsByName is on (the default), the two columns will be merged into a single column of the same name. If MergeColumnsByName is off, both columns will exist in the output. You may set the FirstTablePrefix and SecondTablePrefix to define how the columns named are modified. One of these prefixes may be the empty string, but they must be different.

To create an instance of class vtkMergeTables, simply invoke its constructor as follows

      obj = vtkMergeTables

# Methods

The class vtkMergeTables has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkMergeTables class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkMergeTables = obj.NewInstance ()`
- `vtkMergeTables = obj.SafeDownCast (vtkObject o)`
- `obj.SetFirstTablePrefix (string )` - The prefix to give to same-named fields from the first table. Default is "Table1.".
- `string = obj.GetFirstTablePrefix ()` - The prefix to give to same-named fields from the first table. Default is "Table1.".
- `obj.SetSecondTablePrefix (string )` - The prefix to give to same-named fields from the second table. Default is "Table2.".
- `string = obj.GetSecondTablePrefix ()` - The prefix to give to same-named fields from the second table. Default is "Table2.".
- `obj.SetMergeColumnsByName (bool )` - If on, merges columns with the same name. If off, keeps both columns, but calls one FirstTablePrefix + name, and the other SecondTablePrefix + name. Default is on.
- `bool = obj.GetMergeColumnsByName ()` - If on, merges columns with the same name. If off, keeps both columns, but calls one FirstTablePrefix + name, and the other SecondTablePrefix + name. Default is on.
- `obj.MergeColumnsByNameOn ()` - If on, merges columns with the same name. If off, keeps both columns, but calls one FirstTablePrefix + name, and the other SecondTablePrefix + name. Default is on.
- `obj.MergeColumnsByNameOff ()` - If on, merges columns with the same name. If off, keeps both columns, but calls one FirstTablePrefix + name, and the other SecondTablePrefix + name. Default is on.
- `obj.SetPrefixAllButMerged (bool )` - If on, all columns will have prefixes except merged columns. If off, only unmerged columns with the same name will have prefixes. Default is off.
- `bool = obj.GetPrefixAllButMerged ()` - If on, all columns will have prefixes except merged columns. If off, only unmerged columns with the same name will have prefixes. Default is off.
- `obj.PrefixAllButMergedOn ()` - If on, all columns will have prefixes except merged columns. If off, only unmerged columns with the same name will have prefixes. Default is off.
- `obj.PrefixAllButMergedOff ()` - If on, all columns will have prefixes except merged columns. If off, only unmerged columns with the same name will have prefixes. Default is off.