Skip to content

Commit d1a31a7

Browse files
committed
Remove examples for aliases
1 parent 9f8cfd3 commit d1a31a7

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

python/datafusion/functions.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -845,15 +845,6 @@ def instr(string: Expr, substring: Expr) -> Expr:
845845
"""Finds the position from where the ``substring`` matches the ``string``.
846846
847847
This is an alias for :py:func:`strpos`.
848-
849-
Examples:
850-
---------
851-
>>> ctx = dfn.SessionContext()
852-
>>> df = ctx.from_pydict({"a": ["hello world"]})
853-
>>> result = df.select(
854-
... dfn.functions.instr(dfn.col("a"), dfn.lit("world")).alias("pos"))
855-
>>> result.collect_column("pos")[0].as_py()
856-
7
857848
"""
858849
return strpos(string, substring)
859850

@@ -1027,15 +1018,6 @@ def position(string: Expr, substring: Expr) -> Expr:
10271018
"""Finds the position from where the ``substring`` matches the ``string``.
10281019
10291020
This is an alias for :py:func:`strpos`.
1030-
1031-
Examples:
1032-
---------
1033-
>>> ctx = dfn.SessionContext()
1034-
>>> df = ctx.from_pydict({"a": ["hello"]})
1035-
>>> result = df.select(
1036-
... dfn.functions.position(dfn.col("a"), dfn.lit("llo")).alias("pos"))
1037-
>>> result.collect_column("pos")[0].as_py()
1038-
3
10391021
"""
10401022
return strpos(string, substring)
10411023

0 commit comments

Comments
 (0)