cycquery.ops.DropNullsΒΆ

class DropNulls(cols)[source]ΒΆ

Bases: QueryOp

Remove rows with null values in some specified columns.

Parameters:

cols (Union[str, List[str]]) – Columns in which, if a value is null, the corresponding row is removed.

Examples

>>> DropNulls("col1")(table)
>>> DropNulls(["col1", "col2"])(table)

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