Skip to main content

concat_dataframes_with_keys

Function concat_dataframes_with_keys 

Source
pub fn concat_dataframes_with_keys(
    frames: &[&DataFrame],
    keys: &[&str],
) -> Result<DataFrame, FrameError>
Expand description

Concatenate DataFrames with keys for hierarchical labeling.

Matches pd.concat([df1, df2], keys=['a', 'b']). Prefixes each frame’s index labels with the corresponding key, creating composite labels like “key|original_label”.