def group_concat(df, gr_cols, col_concat):
    """Concatenate multiple rows into one."""

    df_out = (
        df.groupby(gr_cols)[col_concat]
        .apply(lambda x: " ".join(x))
        .to_frame()
        .reset_index()
    )

    return df_out