Re: How can i convert below DataFrame array to string
Thanks also below code helped df.select(concat_ws(",",$"result.accountID") as "accountID") On Tue, Mar 14, 2017 at 5:35 AM, Felix Cheung <felixcheun...@hotmail.com> wrote: > Explode? > > https://spark.apache.org/docs/latest/api/python/pyspark.sql. > html?highlight=explode#pyspark.sql.functions.explode > > > For Spark questions like this, try stackoverflow > > spark.apache.org/community.html > > > > > -- > *From:* Suresh Ayyavoo <sur...@iappsasia.com> > *Sent:* Sunday, March 12, 2017 8:53:52 PM > *To:* users@zeppelin.apache.org > *Subject:* How can i convert below DataFrame array to string > > Hi All, > > How can i convert below DataFrame [accountID: array, > completed_at: array, created_at: array] to > [accountID: string, completed_at: string, created_at: string] > > root > > |-- accountID: array (nullable = true) > > ||-- element: string (containsNull = true) > > |-- completed_at: array (nullable = true) > > ||-- element: string (containsNull = true) > > |-- created_at: array (nullable = true) > > ||-- element: string (containsNull = true) > > > root > |-- accountID: string (containsNull =true) > |-- completed_at: string (containsNull =true) > |--create_at : string (containsNull =true) > > > Thanks > > > -- Suresh Ayyavoo Solution Architect / R Lead iAPPS Pte. Ltd. 3 Fusionopolis Way, Symbiosis #13-25 S(138633) [O] 64631795 [F] 6778 5300 [M] 91540224 Website: www.iappsasia.com Facebook: www.facebook.com/iappsasia Youtube: www.youtube.com/user/iAPPSasia
Re: How can i convert below DataFrame array to string
Explode? https://spark.apache.org/docs/latest/api/python/pyspark.sql.html?highlight=explode#pyspark.sql.functions.explode For Spark questions like this, try stackoverflow spark.apache.org/community.html<http://spark.apache.org/community.html> From: Suresh Ayyavoo <sur...@iappsasia.com> Sent: Sunday, March 12, 2017 8:53:52 PM To: users@zeppelin.apache.org Subject: How can i convert below DataFrame array to string Hi All, How can i convert below DataFrame [accountID: array, completed_at: array, created_at: array] to [accountID: string, completed_at: string, created_at: string] root |-- accountID: array (nullable = true) ||-- element: string (containsNull = true) |-- completed_at: array (nullable = true) ||-- element: string (containsNull = true) |-- created_at: array (nullable = true) ||-- element: string (containsNull = true) root |-- accountID: string (containsNull =true) |-- completed_at: string (containsNull =true) |--create_at : string (containsNull =true) Thanks
How can i convert below DataFrame array to string
Hi All, How can i convert below DataFrame [accountID: array, completed_at: array, created_at: array] to [accountID: string, completed_at: string, created_at: string] root |-- accountID: array (nullable = true) ||-- element: string (containsNull = true) |-- completed_at: array (nullable = true) ||-- element: string (containsNull = true) |-- created_at: array (nullable = true) ||-- element: string (containsNull = true) root |-- accountID: string (containsNull =true) |-- completed_at: string (containsNull =true) |--create_at : string (containsNull =true) Thanks