Advertisement
Danila_lipatov

new_streamlit

Mar 9th, 2023
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. query = f"select * from {table}"
  2. df = pd.read_sql(query, conn)
  3. edit_df = st.experimental_data_editor(df,num_rows='dynamic')
  4. if st.button('Insert'):
  5. if edit_df.tail(len(edit_df)-len(df)).values == "empty":
  6. st.write('True')
  7. for x in edit_df.tail(len(edit_df)-len(df)):
  8. st.write(x)
  9. st.write(edit_df.tail(len(edit_df)-len(df)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement