pyspark.sql.DataFrame.dtypes

property DataFrame.dtypes

Returns all column names and their data types as a list.

New in version 1.3.0.

Examples

>>> df.dtypes
[('age', 'int'), ('name', 'string')]