Help needed regarding printing cells of a data frame based on column header when using streamlit

Hi there,
i have a basic data frame as shown below.


if i select a column 1 , how can i print all the cells from that given column

here is the code i have so far. thx so much for the help in advance !!

import streamlit as st
import pandas as pd

uploaded_file = st.file_uploader(‘Choose a XLSX file’, type=‘xlsx’)
if uploaded_file:

df = pd.read_excel(uploaded_file, engine='openpyxl')
df= df.head(4)

columns = df.columns.tolist()
selected_columns = st.multiselect(“select instance”, columns)
df.columns = df.columns.str.strip()

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.