You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2017/03/25 04:56:41 UTC
[jira] [Commented] (SPARK-20090) Add StructType.fieldNames to
Python API
[ 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org