Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

drop columns pyspark


df.drop("firstname") 
  .printSchema()
""" import col is required """  
df.drop(col("firstname")) 
  .printSchema()  
  
df.drop(df.firstname) 
  .printSchema()   
Source by sparkbyexamples.com #
 
PREVIOUS NEXT
Tagged: #drop #columns #pyspark
ADD COMMENT
Topic
Name
2+1 =