select columns from dataframe pyspark code example Example: pyspark select columns df.select("firstname","lastname")