Selecting Dynamic Columns In Spark DataFrames (aka Excluding Columns)
I often need to perform an inverse selection of columns in a dataframe, or exclude some columns from a query. This is a very easy method, and I use it frequently when arranging features into vectors for machine learning tasks. import org.apache.spark.sql.Column // Create an example dataframe