Schema ext
filter_columns_by_datatype(struct_type, data_type)
Filters and returns a StructType of StructField names from a given StructType schema that match the specified data type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
struct_type
|
StructType
|
The schema of the DataFrame. |
required |
data_type
|
DataType
|
The data type to filter by. |
required |
Returns:
Type | Description |
---|---|
StructType
|
T.StructType: A StructType of StructField names that match the specified data type. |