Create an automatic column with st_aggrid

Hello !
I would like to create an AgGrid with a column “Y” that automatically displays a string based on the previous column “X”.

For example, if a row in column X is 1, then “group 1” should be displayed in the same row in column Y.

I found this code which allows to display a numerical value automatically in a column according to the previous one, but I do not know how to adapt it to display a string. (streamlit-aggrid/virtual_columns.py at main · PablocFonseca/streamlit-aggrid · GitHub)

Thanks