Can we control row in streamlit write

here is the API reference

st.title("Let's create a table!")
for i in range(1, 10):
    cols = st.beta_columns(4)
    cols[0].write(f'{i}')
    cols[1].write(f'{i * i}')
    cols[2].write(f'{i * i * i}')
    cols[3].write('x' * i)

AND now
i want to result like
A B “blank here”
1 2 3
c1,c2,c3 = st.beta_columns(3)
c1.write(‘A’)
c2.write(‘B’)
c3.write(’ ')<----
c1.write(‘1’)
c2.write(‘2’)
c3.write(‘3’)

and then ‘3’ become not in align with “row”

You left out creating another row of colums. If you do this, you should get what you want:

import streamlit as st

st.title("Let's create a table!")
c1, c2, c3 = st.beta_columns(3)
c1.write("A")
c2.write("B")
c3.write(" ")
c1, c2, c3 = st.beta_columns(3) <--- You need to add this
c1.write("1")
c2.write("2")
c3.write("3")

Dinesh

1 Like

thanks you and merry Xmas