Get multi row and column data same time

Boss
I found some code on the Streamlit website that works well for displaying multiple rows and column names. However, I need some assistance in selecting multiple rows and columns to create a new dataframe. Could you please provide guidance and the necessary code for extracting the selected data into this new dataframe? Thank you in advance for your help!
"need selected multi rows and columns data same time "

see code
import streamlit as st
import pandas as pd
import numpy as np

if “df” not in st.session_state:
st.session_state.df = pd.DataFrame(
np.random.randn(12, 5), columns=[“a”, “b”, “c”, “d”, “e”]
)

event = st.dataframe(
st.session_state.df,
key=“data”,
on_select=“rerun”,
selection_mode=[“single-row”, “multi-column”],
)

event.selection