python - How save list data save in dataframe - Stack Overflow

admin2025-04-18  2

I have a basic code that functions correctly, and I have included a visual representation of the data below. I specifically need the data highlighted in the red box. My objective is to extract only this marked data into a new DataFrame. As I am new to Streamlit, I would appreciate your guidance on the appropriate code to achieve this.

my code :

import streamlit as st
import pandas as pd

from st_aggrid import AgGrid

df = pd.DataFrame({'Name': ['A', 'B', 'C'], 'Age': [25, 24, 1]})
container = st.container()
return_df = AgGrid(data = df, data_return_mode = ‘FILTERED’)
dd = st.write(list(return_df.values()))
转载请注明原文地址:http://anycun.com/QandA/1744968131a90169.html