import streamlit as st import sqlite3 import pandas as pd import streamlit as st x = st.slider('Select a value') st.write(x, 'squared is', x * x) conn = sqlite3.connect('fin_data.db') c = conn.cursor() c.execute(""" select * from test """) rows = c.fetchall() # Extract column names from the cursor column_names = [description[0] for description in c.description] # Create a DataFrame df = pd.DataFrame(rows, columns=column_names) print(df) st.dataframe(df) conn.commit() conn.close()