import gradio as gr def pri(df): print(df) print("-----") for item in df: print(item) with gr.Blocks() as demo: df = gr.Dataframe( headers=["name"], datatype=["str"], row_count=5, col_count=(1, "fixed")) btn = gr.Button() btn.click(pri, df) demo.launch()