We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d14831 commit c773349Copy full SHA for c773349
python/datafusion/functions.py
@@ -1053,18 +1053,8 @@ def greatest(*args: Expr) -> Expr:
1053
def ifnull(x: Expr, y: Expr) -> Expr:
1054
"""Returns ``x`` if ``x`` is not NULL. Otherwise returns ``y``.
1055
1056
- This is an alias for :py:func:`nvl`.
1057
-
1058
- Examples:
1059
- >>> ctx = dfn.SessionContext()
1060
- >>> df = ctx.from_pydict({"a": [None, 1], "b": [0, 0]})
1061
- >>> result = df.select(
1062
- ... dfn.functions.ifnull(dfn.col("a"), dfn.col("b")).alias("ifnull")
1063
- ... )
1064
- >>> result.collect_column("ifnull")[0].as_py()
1065
- 0
1066
- >>> result.collect_column("ifnull")[1].as_py()
1067
- 1
+ See Also:
+ This is an alias for :py:func:`nvl`.
1068
"""
1069
return nvl(x, y)
1070
0 commit comments