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