O'Reilly logo
  • Shuchi Mishra thinks this is interesting:

names = rows.map(lambda row: row.name)

From

Cover of Learning Spark
  • 9. Spark SQL
  • from Learning Spark
  • by Matei Zaharia, Patrick Wendell, Andy Konwinski, Holden Karau
  • Publisher: O'Reilly Media, Inc.
  • Released: February 2015

Note

Outdated:
rows = hiveCtx.read.parquet("/FileStore/tables/users.parquet")
rowsrdd = rows.rdd
names = rowsrdd.map(lambda row: row.name)
names.collect()