cycquery.ops.RandomizeOrderΒΆ

class RandomizeOrder(*args, **kwargs)[source]ΒΆ

Bases: QueryOp

Randomize order of table rows.

Useful when the data is ordered, so certain rows cannot be seen or analyzed when limited.

Examples

>>> RandomizeOrder()(table)

Warning

Becomes quite slow on large tables.

Methods

__call__(table)[source]ΒΆ

Process the table.

Parameters:

table (Union[Select, Subquery, Table, DBTable]) – Table on which to perform the operation.

Returns:

Processed table.

Return type:

sqlalchemy.sql.selectable.Subquery