cycquery.ops.FillNullΒΆ

class FillNull(cols, fill_values, new_col_names=None)[source]ΒΆ

Bases: QueryOp

Fill NULL values with a given value.

Parameters:

Examples

>>> FillNull("col1", 0)(table)
>>> FillNull(["col1", "col2"], [0, 1])(table)
>>> FillNull(["col1", "col2"], [0, 1], ["col1_new", "col2_new"])(table)

Methods

__call__(table)[source]ΒΆ

Fill NULL values with a given value.

Parameters:

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

Returns:

Table with NULL values filled.

Return type:

Subquery