Functions
|
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
- dfUnion[pd.DataFrame, cudf.DataFrame]
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.