nxcals.api.extraction.data.builders.DataFrame.dtypes

property DataFrame.dtypes: List[Tuple[str, str]]

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

New in version 1.3.0.

Changed in version 3.4.0: Supports Spark Connect.

Returns:

List of columns as tuple pairs.

Return type:

list

Examples

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