Drag and drop Dataframe cells

Dear all,
Regarding DataFrames, is there a way to display my DataFrame with empty columns and being able to drag and drop the cells from the non-empty columns to the empty columns ?
Thanks.

Hi @blob123,
This functionality isn’t currently supported by st.data_editor, but feel free to open a feature enhancement requests here.

Thanks Caroline.

But maybe we can find a workaround with AgGrid and using the grid to grid way to drag records between grids …

Does anyone have an example of such a feature ?

The JS code is available but I’m getting hard time to translate it into Streamlit / Python…

Are you looking to drag entire rows or move specific cells to other columns?

I’m looking to drag specific cells to other columns

I’m under the impression that Aggrid doesn’t support dragging individual cells either (I believe you can drag columns and rows, but not individual cells, unless you implement a custom drag component)

Custom drag component is exactly what I’m looking to do.

Any Python code already available for this feature ?

I’m not 100% sure you can make the custom drag component work with the streamlit-aggrid component – I’d recommend starting with the docs for the streamlit-aggrid component. The GitHub Issues section for the component might also be helpful.

Thanks Caroline.

Has anyone ever implemented a custom drag component in Streamlit ?

I have similar requirement where I can drag and drop of cells in dataframe irrespective of row and coloumn, and then generate the final output as excel.