I am trying to use st.columns, but it is giving me a DeltaGenerator TypeError when using with col1()
. What am I doing wrong?
Code Snippet
import streamlit as st
...
# Create columns
col1, col2 = st.columns(2)
# Now plot the graphs
with col1():
st.markdown('#### Job Growth')
st.line_chart(
msas_to_plot_jobs,
x='date'
)
with col2():
st.markdown('#### M-o-M Percent Change')
Error Message
TypeError: ‘DeltaGenerator’ object is not callable
Traceback:
File "/Users/WonderWolff/Real_Estate/projects_to_publish/msa_rank_dashboard/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.__dict__)File "/Users/WonderWolff/Real_Estate/projects_to_publish/msa_rank_dashboard/streamlit_app.py", line 179, in <module>
with col1():
Debug Info
Local deployment.
Streamlit version: 1.34.0
Python version: 3.9.3
OS version: Mac 12.7.5