Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Massimo Zappino
Added: May 27, 2020 2:13 PM
Views: 23
Tags: pyspark
  1. from pyspark.sql.functions import col
  2.  
  3. table = spark.sql("table")
  4.  
  5. table.select([col(c).cast("string") for c in table.columns])