concept pyspark.sql.function in category pyspark
appears as: pyspark.sql.functions, pyspark.sql.functions

This is an excerpt from Manning's book Data Analysis with Python and PySpark.
Listing 2.9. Splitting our lines of text into arrays or words
from pyspark.sql.functions import split lines = book.select(split(book.value, " ").alias("line")) lines.show(5) # +--------------------+ # | value| # +--------------------+ # |[The, Project, Gu...| # | []| # |[This, eBook, is,...| # |[almost, no, rest...| # |[re-use, it, unde...| # +--------------------+ # only showing top 5 rows