St.data_editor adds additional double quotes when copying data with double quotes

Hello everyone,

I use st.dataframe_editor to edit some data.

When I copy via Ctrl+C a cell containing a double quotes, the result in the clipboard contains more double quotes than there were in the cell.

Is it a bug?

It’s easy to reproduce the problem:

import streamlit as st
import pandas as pd

df = pd.DataFrame(
    [
       {'copy': 'data1', 'paste': '', 'valid': True},
       {'copy': '"data2', 'paste': '', 'valid': False},
       {'copy': '"data3"', 'paste': '', 'valid': False},
   ]
)
edited_df = st.data_editor(df, num_rows='dynamic')
  • streamlite version 1.28.0
  • python version 3.9.2.