outer apply get top 2 code example
Example: Apply functions to results of SQL queries.
# Apply functions to results of SQL queries.
results = spark.sql(
"SELECT * FROM people")
names = results.map(lambda p: p.name)
# Apply functions to results of SQL queries.
results = spark.sql(
"SELECT * FROM people")
names = results.map(lambda p: p.name)