Answers for "drop columns pyspark"

0

drop columns pyspark

df.drop("firstname") \
  .printSchema()
""" import col is required """  
df.drop(col("firstname")) \
  .printSchema()  
  
df.drop(df.firstname) \
  .printSchema()
Posted by: Guest on September-22-2021

Python Answers by Framework

Browse Popular Code Answers by Language