Given a spark dataframe df, I found that df.filter(col("label")===1).select("user") equals df.select("user").fi
df
df.filter(col("label")===1).select("user")
df.select("user").fi