pyspark.sql.DataFrame.select — PySpark 3.3.1 documentation
spark.apache.org › docs › latestpyspark.sql.DataFrame.select. ¶. DataFrame.select(*cols: ColumnOrName) → DataFrame [source] ¶. Projects a set of expressions and returns a new DataFrame. New in version 1.3.0. Parameters. colsstr, Column, or list. column names (string) or expressions ( Column ). If one of the column names is ‘*’, that column is expanded to include all columns in the current DataFrame.