reverse
reverse
reverses the order of rows in a table.
Syntax
table.reverse() -> Table
Parameters
Returns
A new table with all of the rows from the input table in reverse order.
Examples
from deephaven import new_table
from deephaven.column import string_col, int_col
source = new_table(
[
string_col(
"Tool",
[
"Paring",
"Bread",
"Steak",
"Butter",
"Teaspoon",
"Spoon",
"Slotted",
"Ladle",
],
),
string_col(
"Type",
["Knife", "Knife", "Knife", "Knife", "Spoon", "Spoon", "Spoon", "Spoon"],
),
int_col("Quantity", [5, 8, 11, 10, 24, 3, 2, 4]),
]
)
result = source.reverse()
- source
- result