Setting border=False
on a container causes with use_container_width
in the child dataframe. This is visible from the extra scroll bar along the bottom of the container, indicating the df is too large for the container.
Example:
Code:
cols = st.columns(4)
for i in range(4):
with cols[i]:
with st.container(border=False, height=200):
st.write(f"df{i}")
st.dataframe(
pd.DataFrame([["1", "2", "3"]], ["a", "b", "c"]),
use_container_width=True,
# width=150, # this is closer to the expected behaviour but
# isnt dynamic and results in the same issue
# when the window is resized small enough
)
Is there a workaround to this issue?