spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Armbrust <mich...@databricks.com>
Subject Re: filtering a SchemaRDD
Date Sat, 15 Nov 2014 05:53:03 GMT
>
>
> If I use row[6] instead of row["text"] I get what I am looking for.
> However, finding the right numeric index could be a pain.
>
>
>
> Can I access the fields in a Row of a SchemaRDD by name, so that I can
> map, filter, etc. without a trial and error process of finding the right
> int for the fieldname?
>

row.text should work.

More examples here:
http://spark.apache.org/docs/1.1.0/sql-programming-guide.html#tab_python_2

Michael

Mime
View raw message