dtypes

Vrátí všechny názvy sloupců a jejich datové typy jako seznam.

Návraty

list

Příklady

df = spark.createDataFrame(
    [(14, "Tom"), (23, "Alice"), (16, "Bob")], ["age", "name"])
df.dtypes
# [('age', 'bigint'), ('name', 'string')]