dtypes

すべての列名とそのデータ型をリストとして返します。

返品

list

例示

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