morpheus.utils.nvt.transforms
Functions
json_flatten (col_selector, df) |
Flattens JSON columns in the given DataFrame and concatenates them into a single DataFrame. |
- json_flatten(col_selector, df)[source]
Flattens JSON columns in the given DataFrame and concatenates them into a single DataFrame.
- Parameters
- col_selector
- df
An instance of ColumnSelector that contains the names of the columns to flatten.
The input DataFrame that contains the JSON columns to flatten.
- Returns
- Union[pd.DataFrame, cudf.DataFrame]
A new DataFrame with flattened JSON columns. If ‘df’ was a cudf.DataFrame, the return type is cudf.DataFrame. Otherwise, it is pd.DataFrame.