adp.ingest.schema.flatten_df
- adp.ingest.schema.flatten_df(orig_df: DataFrame) DataFrame
Flatten the StructField columns of a dataframe
Flattens a Dataframe by executing a select query in which the nested columns are specified. The dataframe of the nested columns is recursively appended to the stack, together with the parent selectors. Then, for each item on the stack, the (nested) select statement is generated.
- Parameters:
orig_df (DataFrame) – The dataframe which to flatten, containing nested columns.
- Returns:
The flattened dataframe.
- Return type:
DataFrame