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_selectorColumnSelector

An instance of ColumnSelector that contains the names of the columns to flatten.

dfUnion[pd.DataFrame, cudf.DataFrame]

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.

© Copyright 2023, NVIDIA. Last updated on Aug 23, 2023.