opomba,
Dostop do te strani zahteva pooblastilo. Poskusite se vpisati alispremeniti imenike.
Dostop do te strani zahteva pooblastilo. Poskusite lahko spremeniti imenike.
Returns true if the XPath expression evaluates to true, or if a matching node is found.
Syntax
from pyspark.sql import functions as sf
sf.xpath_boolean(xml, path)
Parameters
| Parameter | Type | Description |
|---|---|---|
xml |
pyspark.sql.Column or str |
XML column or column name. |
path |
pyspark.sql.Column or str |
XPath expression. |
Examples
from pyspark.sql import functions as sf
df = spark.createDataFrame([('<a><b>1</b></a>',)], ['x'])
df.select(sf.xpath_boolean(df.x, sf.lit('a/b'))).show()
+---------------------+
|xpath_boolean(x, a/b)|
+---------------------+
| true|
+---------------------+