df = sc.parallelize([(0, 0), (1, 2)]).toDF(["x", "y"]) df.drop("y")
df.select(list(set(df.columns) - set(["B"])))