How to display column to row in streamlit

image
image

How to display this to row

One option is to use df.T to transpose your dataframe

import pandas as pd
import streamlit as st

s = pd.DataFrame([1, 2, 3, 4, 5])

st.write(s)

st.write(s.T)