pyspark.sql.DataFrame.columns

property DataFrame.columns

Returns all column names as a list.

Examples

>>> df.columns
['age', 'name']