move_columns_down
The move_columns_down_
method creates a new table with specified columns appearing last in order, to the far right.
Syntax
table.move_columns_down(cols=[columnNames...])
Parameters
Parameter | Type | Description |
---|---|---|
columnNames | String... | Columns to move to the right side of the new table. |
Returns
A new table with specified columns appearing last in order, to the far right.
Examples
The following example moves column B
to the last position in the resulting table.
from deephaven import new_table
from deephaven.column import string_col, int_col
source = new_table([
string_col("A", ["apple", "apple", "orange", "orange", "plum", "plum"]),
int_col("B", [1, 1, 2, 2, 3, 3]),
string_col("C", ["Macoun", "Opal", "Navel", "Cara Cara ", "Greengage", "Mirabelle"]),
int_col("D", [1, 2, 12, 3, 2, 3]),
])
result = source.move_columns_down(cols=["B"])
- source
- result
The following example moves columns B
and D
to the last positions in the resulting table.
from deephaven import new_table
from deephaven.column import string_col, int_col
source = new_table([
string_col("A", ["apple", "apple", "orange", "orange", "plum", "plum"]),
int_col("B", [1, 1, 2, 2, 3, 3]),
string_col("C", ["Macoun", "Opal", "Navel", "Cara Cara ", "Greengage", "Mirabelle"]),
int_col("D", [1, 2, 12, 3, 2, 3]),
])
result = source.move_columns_down(cols=["B", "D"])
- source
- result