[ 
https://issues.apache.org/jira/browse/SPARK-20090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941577#comment-15941577
 ] 

Hyukjin Kwon commented on SPARK-20090:
--------------------------------------

Hm.. don't we have {{names}}?

Scala

{code}
scala> spark.range(1).schema.fieldNames
res1: Array[String] = Array(id)
{code}

Python

{code}
>>> spark.range(1).schema.names
['id']
{code}

> Add StructType.fieldNames to Python API
> ---------------------------------------
>
>                 Key: SPARK-20090
>                 URL: https://issues.apache.org/jira/browse/SPARK-20090
>             Project: Spark
>          Issue Type: New Feature
>          Components: PySpark, SQL
>    Affects Versions: 2.1.0
>            Reporter: Joseph K. Bradley
>            Priority: Trivial
>
> The Scala/Java API for {{StructType}} has a method {{fieldNames}}.  It would 
> be nice if the Python {{StructType}} did as well.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to