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)

Warnings:

Becomes quite slow on large tables.

Initialize the class.

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

__init__(*args, **kwargs)

Initialize the class.