pyspark.sql.DataFrame.columns

property DataFrame.columns

Returns all column names as a list.

New in version 1.3.0.

Examples

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