Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gd = GridOptionsBuilder.from_dataframe(df)
- gd.configure_pagination(enabled=True)
- gd.configure_default_column(editable=True, groupable=True)
- gd.configure_selection(selection_mode="multiple", use_checkbox=True)
- gridoptions = gd.build()
- grid_table = AgGrid(
- df,
- gridOptions=gridoptions,
- update_mode=GridUpdateMode.SELECTION_CHANGED,
- theme="material",
- )
- sel_row = grid_table["selected_rows"]
- st.subheader(" ② Check your selection")
- st.write("")
- df_sel_row = pd.DataFrame(sel_row)
- st.write(df_sel_row)
- download = st.button('DOWNLOAD TABLE')
- csv = df_sel_row.to_excel('large_df_2.xlsx')
- if download == True:
- st.download_button(label="Download data as xlsx",
- data=csv,
- mime='text/xlsx')
- st.write('CHECK')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement